measure(_:)
Measure the elapsed time to execute an asynchronous closure.
Declaration
nonisolated(nonsending) func measure(_ work: nonisolated(nonsending) () async throws -> Void) async rethrows -> Self.Instant.DurationDiscussion
let clock = ContinuousClock()
let elapsed = await clock.measure {
await someWork()
}