1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:14:42 -07:00

time: Remove unnecessary call to Nanoseconds() in after().

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4528091
This commit is contained in:
Kyle Consalus 2011-05-23 12:38:51 -07:00 committed by Brad Fitzpatrick
parent ae22d30eaf
commit 78a7dda739

View File

@ -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")
}