siddontang.golib/timingwheel/timingwheel_test.go

18 lines
216 B
Go
Raw Permalink Normal View History

2014-01-09 12:37:01 +08:00
package timingwheel
import (
"testing"
"time"
)
func TestTimingWheel(t *testing.T) {
w := NewTimingWheel(100*time.Millisecond, 10)
2014-01-09 12:37:01 +08:00
for {
select {
case <-w.After(200 * time.Millisecond):
2014-01-09 12:37:01 +08:00
return
}
}
}