- 重构了一下misc中定时器相关的函数

This commit is contained in:
gazebo
2019-07-19 15:10:56 +08:00
parent f92ff23a56
commit f65e06168e
4 changed files with 95 additions and 84 deletions

View File

@@ -0,0 +1,13 @@
package misc
import (
"testing"
"time"
)
func TestScheduleTimerFuncByInterval(t *testing.T) {
ScheduleTimerFuncByInterval(func() {
t.Log(time.Now())
}, time.Second, 7*time.Second)
time.Sleep(30 * time.Second)
}