MCPcopy Create free account
hub / github.com/pace/bricks / Duration

Method Duration

pkg/routine/backoff.go:23–32  ·  view source on GitHub ↗

Duration returns the duration of the requested backoff and resets all others.

(key interface{})

Source from the content-addressed store, hash-verified

21
22// Duration returns the duration of the requested backoff and resets all others.
23func (all combinedExponentialBackoff) Duration(key interface{}) (dur time.Duration) {
24 for k, backoff := range all {
25 if k == key {
26 dur = backoff.Duration()
27 } else {
28 backoff.Reset()
29 }
30 }
31 return
32}

Callers 5

instrumentCallMethod · 0.80
ParseMethod · 0.80
GetMethod · 0.80
TestGetMethod · 0.80
singleRunMethod · 0.80

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected