MCPcopy Create free account
hub / github.com/encodeous/nylon / DurationToMetric

Function DurationToMetric

state/endpoint.go:313–318  ·  view source on GitHub ↗
(d time.Duration)

Source from the content-addressed store, hash-verified

311}
312
313func 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
320func MetricToDuration(m uint32) time.Duration {
321 if m >= INF {

Callers 3

MetricMethod · 0.85
StartMethod · 0.85
StartMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected