diff options
Diffstat (limited to 'src/pkg/time/sleep_test.go')
-rw-r--r-- | src/pkg/time/sleep_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/time/sleep_test.go b/src/pkg/time/sleep_test.go index 9908e220f..1322f0611 100644 --- a/src/pkg/time/sleep_test.go +++ b/src/pkg/time/sleep_test.go @@ -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) } |