diff options
author | Russ Cox <rsc@golang.org> | 2009-01-05 11:18:20 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-05 11:18:20 -0800 |
commit | 3416a8cfa2277e67863bd8e2bf5cc4cb33e69cc2 (patch) | |
tree | a28ba69b6747fc77fa1d3431d2118174bfdc7f34 /src/lib | |
parent | 21488682c828c089ba9543ce18424a4935798abb (diff) | |
download | golang-3416a8cfa2277e67863bd8e2bf5cc4cb33e69cc2.tar.gz |
change time.Tick test to use 100ms intervals.
now passes even under loaded conditions on r45.
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=22019
CL=22022
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/time/tick_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/time/tick_test.go b/src/lib/time/tick_test.go index f9b18fc1d..85eb52e0f 100644 --- a/src/lib/time/tick_test.go +++ b/src/lib/time/tick_test.go @@ -11,7 +11,7 @@ import ( export func TestTick(t *testing.T) { const ( - Delta uint64 = 10*1e6; + Delta uint64 = 100*1e6; Count uint64 = 10; ); c := Tick(Delta); @@ -24,6 +24,6 @@ export func TestTick(t *testing.T) { target := int64(Delta*Count); slop := target*2/10; if ns < target - slop || ns > target + slop { - t.Fatalf("%d ticks of %d ns took %d ns, expected %d", Count, Delta, ns, target); + t.Fatalf("%d ticks of %g ns took %g ns, expected %g", Count, float64(Delta), float64(ns), float64(target)); } } |