go/timingwheel/timingwheel_test.go

20 lines
256 B
Go
Raw Normal View History

2014-01-09 08:37:01 +04:00
package timingwheel
import (
"testing"
"time"
)
func TestTimingWheel(t *testing.T) {
w := NewTimingWheel(1*time.Second, 10)
t.Log(time.Now().Unix())
for {
select {
case <-w.After(1 * time.Second):
t.Log(time.Now().Unix())
return
}
}
}