TimeSource
@ExperimentalTime interface TimeSourceTypes
Monotonic
The most precise time source available in the platform.
object Monotonic : TimeSourceFunctions
Extension Functions
measureTime
Executes the given function block and returns the duration of elapsed time interval.
fun TimeSource.measureTime(block: () -> Unit): DurationmeasureTimedValue
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.
fun <T> TimeSource.measureTimedValue(
block: () -> T
): TimedValue<T>Inheritors
AbstractDoubleTimeSource
An abstract class used to implement time sources that return their readings as Double values in the specified unit.
abstract class AbstractDoubleTimeSource : TimeSourceAbstractLongTimeSource
An abstract class used to implement time sources that return their readings as Long values in the specified unit.
abstract class AbstractLongTimeSource : TimeSource