diff --git a/sysutils.go b/sysutils.go index 50f71f7..4b830ef 100644 --- a/sysutils.go +++ b/sysutils.go @@ -335,8 +335,8 @@ func AdjustRangeValue[T int | int32 | int64 | float32 | float64](value T, minV T return value } -func CreateCondTimer(ch chan int64, cond *sync.Cond) { - var waitSecond int64 = 10 +func CreateCondTimer(ch chan int64, cond *sync.Cond, initSeconds int64) { + waitSecond := initSeconds for { select { case waitSecond = <-ch: