measureTimedValue

Common
JVM
JS
Native
1.9
inline fun <T> measureTimedValue(
    block: () -> T
): TimedValue<T>

(source)

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.

Common
JVM
JS
Native
1.9
inline fun <T> TimeSource.measureTimedValue(
    block: () -> T
): TimedValue<T>

(source)

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.

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

Common
JVM
JS
Native
1.9
inline fun <T> Monotonic.measureTimedValue(
    block: () -> T
): TimedValue<T>

(source)

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.

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