timedScope

inline fun <T> LoggerScope.timedScope(name: String, body: () -> T): T

Measures the duration of a scope.

Shorthand for scope(name) { duration { body }}.

Return

The result of the body invocation.

Parameters

T

The result type of the scoped function.

name

Name of custom sub-scope.

body

Function which defines the sub-scope.