ValueTimeMark

Platform and version requirements: JVM (1.7), JS (1.7), Native (1.7)
@ExperimentalTime inline class ValueTimeMark : TimeMark

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.

Functions

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

elapsedNow

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

fun elapsedNow(): Duration
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

hasNotPassedNow

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

fun hasNotPassedNow(): Boolean
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

hasPassedNow

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

fun hasPassedNow(): Boolean
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

minus

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

fun minus(duration: Duration): ValueTimeMark
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

plus

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

fun plus(duration: Duration): ValueTimeMark

© 2010–2022 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-source/-monotonic/-value-time-mark/index.html