duration

public final static T duration<T extends Any>(Logger $self, Function0<T> body)

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

body

Function which should be measured.

Type Parameters

T

Result type of body execution.