1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-18 23:47:48 +02:00
ferret/pkg/drivers/cdp/input/helpers.go
Tim Voronov eee801fb5b
Refactoring/input manager (#316)
* Normalized and externalized input logic

* Fixed linting issue

* Removed redundant mutex

* Added missed locks in Page

* Fixed deadlock
2019-06-20 13:21:48 -04:00

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))
}