This commit is contained in:
aozhiwei 2024-06-29 20:56:28 +08:00
parent 6d58535a91
commit f715cffbce

View File

@ -335,8 +335,8 @@ func AdjustRangeValue[T int | int32 | int64 | float32 | float64](value T, minV T
return value return value
} }
func CreateCondTimer(ch chan int64, cond *sync.Cond) { func CreateCondTimer(ch chan int64, cond *sync.Cond, initSeconds int64) {
var waitSecond int64 = 10 waitSecond := initSeconds
for { for {
select { select {
case waitSecond = <-ch: case waitSecond = <-ch: