TimeMark

Common
JVM
JS
Native
1.9
interface TimeMark
(source)

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).

Functions

Common
JVM
JS
Native
1.0

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
Common
JVM
JS
Native
1.0

hasNotPassedNow

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

open fun hasNotPassedNow(): Boolean
Common
JVM
JS
Native
1.0

hasPassedNow

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

open fun hasPassedNow(): Boolean
Common
JVM
JS
Native
1.0

minus

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

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

plus

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

open operator fun plus(duration: Duration): TimeMark

Inheritors

Common
JVM
JS
Native
1.9

ComparableTimeMark

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>