mirror of https://github.com/golang/go.git
time: stop 1ns timer in test
R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/8819046
This commit is contained in:
parent
277047f52a
commit
489addd250
|
|
@ -60,10 +60,11 @@ func TestAfterStress(t *testing.T) {
|
|||
Sleep(Nanosecond)
|
||||
}
|
||||
}()
|
||||
c := Tick(1)
|
||||
ticker := NewTicker(1)
|
||||
for i := 0; i < 100; i++ {
|
||||
<-c
|
||||
<-ticker.C
|
||||
}
|
||||
ticker.Stop()
|
||||
atomic.StoreUint32(&stop, 1)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue