AbstractLongTimeSource

An abstract class used to implement time sources that return their readings as Long values in the specified unit.

Since Kotlin

1.3

Inheritors

Constructors

Link copied to clipboard
constructor(unit: DurationUnit)

Properties

Link copied to clipboard
protected val unit: DurationUnit

The unit in which this time source's readings are expressed.

Since Kotlin 1.3

Functions

Link copied to clipboard
open override fun markNow(): TimeMark

Marks a point in time on this time source.

Since Kotlin 1.3
Link copied to clipboard

Executes the given function block and returns the duration of elapsed time interval.

Since Kotlin 1.3
Link copied to clipboard

Executes the given block and returns an instance of TimedValue class, containing both the result of function execution and the duration of elapsed time interval.

Since Kotlin 1.3
Link copied to clipboard
protected abstract fun read(): Long

This protected method should be overridden to return the current reading of the time source expressed as a Long number in the unit specified by the unit property.

Since Kotlin 1.3