(d time.Duration)
| 311 | } |
| 312 | |
| 313 | func DurationToMetric(d time.Duration) uint32 { |
| 314 | if d == time.Duration(math.MaxInt64) { |
| 315 | return INF |
| 316 | } |
| 317 | return uint32(min(d.Microseconds(), int64(INF)-1)) |
| 318 | } |
| 319 | |
| 320 | func MetricToDuration(m uint32) time.Duration { |
| 321 | if m >= INF { |