mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
Update dropper.go
This commit is contained in:
parent
5e6f7374de
commit
8b3ce0b6f9
1 changed files with 3 additions and 0 deletions
|
|
@ -145,6 +145,9 @@ func randomDuration(min, max time.Duration) time.Duration {
|
|||
if min > max {
|
||||
panic("min duration must be less than or equal to max duration")
|
||||
}
|
||||
if min == max {
|
||||
return min
|
||||
}
|
||||
return time.Duration(mrand.Int63n(int64(max-min)) + int64(min))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue