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:
parent
ae22d30eaf
commit
78a7dda739
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user