mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-23 01:24:30 +02:00
eee801fb5b
* Normalized and externalized input logic * Fixed linting issue * Removed redundant mutex * Added missed locks in Page * Fixed deadlock
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))
|
|
}
|