measure Timed Value
Executes the given function block and returns an instance of TimedValue class, containing both the result of the function execution and the duration of elapsed time interval.
The elapsed time is measured with TimeSource.Monotonic.
Since Kotlin
1.3
inline fun <T> TimeSource.measureTimedValue(block: () -> T): TimedValue<T>
Content copied to clipboard
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.
The elapsed time is measured with the specified this
TimeSource instance.
Since Kotlin
1.3