measureTime

Common
JVM
JS
Native
1.9
inline fun measureTime(block: () -> Unit): Duration
(source)

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.9
inline fun TimeSource.measureTime(
    block: () -> Unit
): Duration

(source)

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

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

Common
JVM
JS
Native
1.9
inline fun Monotonic.measureTime(block: () -> Unit): Duration
(source)

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

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