ClockMark

Common
JVM
JS
Native
1.3
abstract class ClockMark

Represents a time point notched on a particular Clock. Remains bound to the clock it was taken from and allows querying for the duration of time elapsed from that point (see the function elapsedNow).

Constructors

Common
JVM
JS
Native
1.0

<init>

Represents a time point notched on a particular Clock. Remains bound to the clock it was taken from and allows querying for the duration of time elapsed from that point (see the function elapsedNow).

ClockMark()

Functions

Common
JVM
JS
Native
1.0

elapsedNow

Returns the amount of time passed from this clock mark on the clock from which this mark was taken.

abstract fun elapsedNow(): Duration
Common
JVM
JS
Native
1.0

hasNotPassedNow

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

fun hasNotPassedNow(): Boolean
Common
JVM
JS
Native
1.0

hasPassedNow

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

fun hasPassedNow(): Boolean
Common
JVM
JS
Native
1.0

minus

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

open operator fun minus(duration: Duration): ClockMark
Common
JVM
JS
Native
1.0

plus

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

open operator fun plus(duration: Duration): ClockMark

Extension Functions

Common
JVM
JS
Native
1.3

compareTo

operator fun ClockMark.compareTo(other: ClockMark): Int
Common
JVM
JS
Native
1.3

minus

operator fun ClockMark.minus(other: ClockMark): Duration