From 834028d5270794c02a2744bb778cde3c1c8effe8 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Sun, 4 Nov 2012 18:07:59 +0800 Subject: [PATCH] net: fix timeout slack calculation R=alex.brainman CC=golang-dev https://golang.org/cl/6816085 --- src/pkg/net/timeout_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/net/timeout_test.go b/src/pkg/net/timeout_test.go index d81cbb7c85..68d8ced011 100644 --- a/src/pkg/net/timeout_test.go +++ b/src/pkg/net/timeout_test.go @@ -164,7 +164,7 @@ func TestReadWriteDeadline(t *testing.T) { ) checkTimeout := func(command string, start time.Time, should time.Duration) { is := time.Now().Sub(start) - d := should - is + d := is - should if d < -30*time.Millisecond || !testing.Short() && 150*time.Millisecond < d { t.Errorf("%s timeout test failed: is=%v should=%v\n", command, is, should) }