measureTime

Common
JVM
JS
Native
1.3
@ExperimentalTime inline fun measureTime(
    block: () -> Unit
): Duration

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

The elapsed time is measured with TimeSource.Monotonic.

Common
JVM
JS
Native
1.3
@ExperimentalTime inline fun TimeSource.measureTime(
    block: () -> Unit
): Duration

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

The elapsed time is measured with the specified this TimeSource instance.