MCPcopy
hub / github.com/grafana/dskit / doubleDuration

Function doubleDuration

backoff/backoff.go:121–129  ·  view source on GitHub ↗
(value time.Duration, max time.Duration)

Source from the content-addressed store, hash-verified

119}
120
121func doubleDuration(value time.Duration, max time.Duration) time.Duration {
122 value = value * 2
123
124 if value <= max {
125 return value
126 }
127
128 return max
129}

Callers 3

NewFunction · 0.85
ResetMethod · 0.85
NextDelayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected