增加立即执行的定时器示例
This commit is contained in:
parent
9c8b64eaf3
commit
6a05f8614c
@ -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++ {
|
||||
|
Loading…
Reference in New Issue
Block a user