mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-25 01:32:13 +02:00
15 lines
254 B
Go
15 lines
254 B
Go
|
package input
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||
|
)
|
||
|
|
||
|
func randomDuration(delay int) time.Duration {
|
||
|
max, min := core.NumberBoundaries(float64(delay))
|
||
|
value := core.Random(max, min)
|
||
|
|
||
|
return time.Duration(int64(value))
|
||
|
}
|