orbit-util / orbit.util.time / stopwatch

stopwatch

inline fun <T> stopwatch(clock: Clock, body: () -> T): ElapsedAndResult<T>

A stopwatch that measures the time that elapses for the given computation.

Parameters

clock - The clock to use for measuring time.

body - The computation to measure.