From: Kyle Consalus Date: Mon, 23 May 2011 19:38:51 +0000 (-0700) Subject: time: Remove unnecessary call to Nanoseconds() in after(). X-Git-Tag: weekly.2011-06-02~138 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=78a7dda739edb2752215675980d6a950b6d6721b;p=gostls13.git time: Remove unnecessary call to Nanoseconds() in after(). R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/4528091 --- diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go index 3bc253c94a..314622d0dc 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") }