aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-04-26 11:08:50 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-04-26 11:08:50 +0400
commit489addd250eca20608588197acc730cef23f9e9e (patch)
tree5f60e03d895189b380bb26f629837f16d7aca19c /src/pkg
parent277047f52ae36f9364bf6d593931ee8732d96cb3 (diff)
downloadgo-489addd250eca20608588197acc730cef23f9e9e.tar.xz
time: stop 1ns timer in test
R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/8819046
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/time/sleep_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/time/sleep_test.go b/src/pkg/time/sleep_test.go
index 9908e220f0..1322f06114 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)
}