go/timingwheel/timingwheel_test.go

18 lines
216 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(100*time.Millisecond, 10)
2014-01-09 08:37:01 +04:00
for {
select {
case <-w.After(200 * time.Millisecond):
2014-01-09 08:37:01 +04:00
return
}
}
}