TimeSource
Types
Monotonic
The most precise time source available in the platform.
object Monotonic : WithComparableMarks
WithComparableMarks
A TimeSource that returns time marks that can be compared for difference with each other.
interface WithComparableMarks : TimeSource
Functions
Extension Functions
measureTime
Executes the given function block and returns the duration of elapsed time interval.
fun TimeSource.measureTime(block: () -> Unit): Duration
measureTimedValue
Executes the given function 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>