You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
motivation: some metrics backend prefer to be given a hint about the preferred display unit (seconds, milliseconds, etc) to drive the ux
changes: add a `preferedUnit` to TimerHandler (and `TimeUnits`) to capture the prefer display unit
/// - displayUnit: A hint to the backend responsible for presenting the data of the preferred display unit. This is not guaranteed to be supported by all backends.
/// Signal the underlying metrics library that this timer will never be updated again.
187
203
/// In response the library MAY decide to eagerly release any resources held by this `Timer`.
188
204
@inlinable
@@ -483,6 +499,18 @@ public protocol TimerHandler: AnyObject {
483
499
/// - parameters:
484
500
/// - value: Duration to record.
485
501
func recordNanoseconds(_ duration:Int64)
502
+
503
+
/// Set the preferred display unit for this TimerHandler.
504
+
///
505
+
/// - parameters:
506
+
/// - unit: A hint to the backend responsible for presenting the data of the preferred display unit. This is not guaranteed to be supported by all backends.
0 commit comments