measure(_:)
Measure the elapsed time to execute a closure.
Declaration
func measure(_ work: () throws -> Void) rethrows -> Self.Instant.DurationDiscussion
let clock = ContinuousClock()
let elapsed = clock.measure {
someWork()
}Measure the elapsed time to execute a closure.
func measure(_ work: () throws -> Void) rethrows -> Self.Instant.Duration let clock = ContinuousClock()
let elapsed = clock.measure {
someWork()
}