duration

inline fun <T> Logger.duration(body: () -> T): T

Measures the duration it takes to invoke the body. Logs with Verbose level message Started before the invocation and Finished took XYZms after completion.

Return

Result of body execution.

Parameters

T

Result type of body execution.

body

Function which should be measured.