Commit 78a7dda7 authored by Kyle Consalus's avatar Kyle Consalus Committed by Brad Fitzpatrick

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

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4528091
parent ae22d30e
......@@ -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")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment