MCPcopy Index your code
hub / github.com/riverqueue/river / SecondsAsDuration

Function SecondsAsDuration

rivershared/util/timeutil/time_util.go:10–12  ·  view source on GitHub ↗

SecondsAsDuration is a simple shortcut for converting seconds represented as a float to a `time.Duration`.

(seconds float64)

Source from the content-addressed store, hash-verified

8// SecondsAsDuration is a simple shortcut for converting seconds represented as
9// a float to a `time.Duration`.
10func SecondsAsDuration(seconds float64) time.Duration {
11 return time.Duration(seconds * float64(time.Second))
12}
13
14// TickerWithInitialTick is similar to `time.Ticker`, except that it fires once
15// immediately upon initialization. It also respects context cancellation and

Callers 7

NextRetryMethod · 0.92
TestSecondsAsDurationFunction · 0.92
ExponentialBackoffFunction · 0.92
NextRetryMethod · 0.92
NextRetryMethod · 0.92

Calls

no outgoing calls

Tested by 4

TestSecondsAsDurationFunction · 0.74
NextRetryMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…