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