-
Convenience for measuring duration of a closure.
Declaration
Swift
@inlinable static func measure<T>(label: String, dimensions: [(String, String)] = [], body: @escaping () throws -> T) rethrows -> TParameters
labelThe label for the Timer.
dimensionsThe dimensions for the Timer.
bodyClosure to run & record.
-
Record the time interval (with nanosecond precision) between the passed
sincedispatch time andenddispatch time.Declaration
Swift
func recordInterval(since: DispatchTime, end: DispatchTime = .now())Parameters
sinceStart of the interval as
DispatchTime.endEnd of the interval, defaulting to
.now(). -
Convenience for recording a duration based on TimeInterval.
Declaration
Swift
@inlinable func record(_ duration: TimeInterval)Parameters
durationThe duration to record.
-
Convenience for recording a duration based on DispatchTimeInterval.
Declaration
Swift
@inlinable func record(_ duration: DispatchTimeInterval)Parameters
durationThe duration to record.
View on GitHub
Install in Dash
Timer Extension Reference