measureTime

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.

Since Kotlin

1.3

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 thisTimeSource instance.

Since Kotlin

1.3