summaryrefslogtreecommitdiff
path: root/src/pkg/time/sleep.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/time/sleep.go')
-rw-r--r--src/pkg/time/sleep.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go
index 3bc253c94..314622d0d 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")
}