]> Cypherpunks repositories - gostls13.git/commitdiff
time: fix build
authorRuss Cox <rsc@golang.org>
Mon, 6 Dec 2010 21:22:32 +0000 (16:22 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 6 Dec 2010 21:22:32 +0000 (16:22 -0500)
Allow less precise timing on build machines.

TBR=r
CC=golang-dev
https://golang.org/cl/3391043

src/pkg/time/sleep_test.go

index 9fd38d18d1a5a36c2e7eeec03610f7f74f1f3063..e70b84e97c15f6e2aaacab7319cfb77a35930f2c 100644 (file)
@@ -88,9 +88,9 @@ func TestAfterQueuing(t *testing.T) {
                }
                ns := r.t - t0
                target := int64(slot * Delta)
-               slop := int64(Delta) / 10
+               slop := int64(Delta) / 4
                if ns < target-slop || ns > target+slop {
-                       t.Fatalf("after queue slot %d arrived at %g, expected %g", slot, float64(ns), float64(target))
+                       t.Fatalf("after queue slot %d arrived at %g, expected [%g,%g]", slot, float64(ns), float64(target-slop), float64(target+slop))
                }
        }
 }