From 78a7dda739edb2752215675980d6a950b6d6721b Mon Sep 17 00:00:00 2001 From: Kyle Consalus Date: Mon, 23 May 2011 12:38:51 -0700 Subject: [PATCH] time: Remove unnecessary call to Nanoseconds() in after(). R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/4528091 --- src/pkg/time/sleep.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go index 3bc253c94a3..314622d0dc9 100644 --- a/src/pkg/time/sleep.go +++ b/src/pkg/time/sleep.go @@ -91,7 +91,7 @@ func (e *Timer) Stop() (ok bool) { // It assumes that f will not block. func after(ns int64, f func(int64)) (e *Timer) { now := Nanoseconds() - t := Nanoseconds() + ns + t := now + ns if ns > 0 && t < now { panic("time: time overflow") }