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

Function DurationBetween

rivershared/util/randutil/rand_util.go:11–13  ·  view source on GitHub ↗

DurationBetween generates a random duration in the range of [lowerLimit, upperLimit).

(lowerLimit, upperLimit time.Duration)

Source from the content-addressed store, hash-verified

9
10// DurationBetween generates a random duration in the range of [lowerLimit, upperLimit).
11func DurationBetween(lowerLimit, upperLimit time.Duration) time.Duration {
12 return time.Duration(IntBetween(int(lowerLimit), int(upperLimit)))
13}
14
15func Hex(length int) string {
16 bytes := make([]byte, length)

Callers 12

reportQueueStatusLoopMethod · 0.92
Test_Client_Stop_CommonFunction · 0.92
StaggerStartMethod · 0.92
runOnceMethod · 0.92
runOnceMethod · 0.92
runOnceMethod · 0.92
runOnceMethod · 0.92
runFollowerStateMethod · 0.92
TestNotifierFunction · 0.92
TestDurationBetweenFunction · 0.85

Calls 1

IntBetweenFunction · 0.85

Tested by 3

Test_Client_Stop_CommonFunction · 0.74
TestNotifierFunction · 0.74
TestDurationBetweenFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…