measureTimeWithResult

inline fun <T> measureTimeWithResult(callback: () -> T): TimedResult<T>

Executes the callback measuring the time it takes to complete. Returns a TimedResult with the time and the return value of the callback.