timed

fun <T> timed(message: (Duration) -> Unit, block: () -> T): T(source)

Simple helper function to log how long a given task took.

Return

The result of the given block

Parameters

message

The lambda invoked with the measured duration (Duration) of the given block.

block

The code block to time.