interface TimeMark
Represents a time point notched on a particular TimeSource. Remains bound to the time source it was taken from and allows querying for the duration of time elapsed from that point (see the function elapsedNow).
Returns the amount of time passed from this mark measured with the time source from which this mark was taken.
abstract fun elapsedNow(): Duration
Returns false if this time mark has not passed according to the time source from which this mark was taken.
open fun hasNotPassedNow(): Boolean
Returns true if this time mark has passed according to the time source from which this mark was taken.
open fun hasPassedNow(): Boolean
A TimeMark that can be compared for difference with other time marks obtained from the same TimeSource.WithComparableMarks time source.
interface ComparableTimeMark : TimeMark, Comparable<ComparableTimeMark>
© 2010–2023 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/-time-mark/