增加立即执行的定时器示例

This commit is contained in:
fantasticbin 2024-11-20 15:04:02 +08:00
parent 9c8b64eaf3
commit 6a05f8614c

View File

@ -8,13 +8,7 @@ import (
func TestTicker(t *testing.T) {
now := time.Now()
// 记录初始时间
data := []int64{
now.Unix(),
}
expected := []int64{
now.Unix(),
}
var data, expected []int64
// 预期每隔一秒收到一个信号
for i := 0; i < 3; i++ {