ValueTimeMark

A specialized kotlin.time.TimeMark returned by TimeSource.Monotonic.

This time mark is implemented as an inline value class wrapping a platform-dependent time reading value of the default monotonic time source, thus allowing to avoid additional boxing of that value.

The operations plus and minus are also specialized to return ValueTimeMark type.

Since Kotlin

1.7

Functions

Link copied to clipboard
inline operator fun TimeMark.compareTo(other: TimeMark): Int
Since Kotlin 1.3
Link copied to clipboard
open override fun elapsedNow(): Duration

Returns the amount of time passed from this mark measured with the time source from which this mark was taken.

Since Kotlin 1.7
Link copied to clipboard
open override fun hasNotPassedNow(): Boolean

Returns false if this time mark has not passed according to the time source from which this mark was taken.

Since Kotlin 1.7
Link copied to clipboard
open override fun hasPassedNow(): Boolean

Returns true if this time mark has passed according to the time source from which this mark was taken.

Since Kotlin 1.7
Link copied to clipboard
open operator override fun minus(duration: Duration): TimeSource.Monotonic.ValueTimeMark

Returns a time mark on the same time source that is behind this time mark by the specified duration.

Since Kotlin 1.7
Link copied to clipboard
inline operator fun TimeMark.minus(other: TimeMark): Duration
Since Kotlin 1.3
Link copied to clipboard
open operator override fun plus(duration: Duration): TimeSource.Monotonic.ValueTimeMark

Returns a time mark on the same time source that is ahead of this time mark by the specified duration.

Since Kotlin 1.7