From d40b258a47c4fd8f74a2afe6b856827a3cd3253b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 24 Jul 2024 09:41:44 +0800 Subject: [PATCH] 1 --- sysutils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysutils.go b/sysutils.go index 20ce26e..c7fb225 100644 --- a/sysutils.go +++ b/sysutils.go @@ -353,6 +353,11 @@ func CreateCondTimer(ch chan int64, cond *sync.Cond, initSeconds int64) { } } +func ExcUntilOk(cb func()bool) { + for !cb() { + } +} + func IsDebug() bool { return true }