commit | 0e3355903d2ebcf5ee9e76096f51ac9a116a9dbb | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Thu Feb 02 16:20:58 2017 -0500 |
committer | Russ Cox <rsc@golang.org> | Fri Feb 03 19:04:52 2017 +0000 |
tree | 50cba3a8521e07846222393f5045bfec0cba5ffc | |
parent | 8179b9b462eb2946de8488a26dca91a89b3d22e6 [diff] [blame] |
time: record monotonic clock reading in time.Now, for more accurate comparisons See https://golang.org/design/12914-monotonic for details. Fixes #12914. Change-Id: I80edc2e6c012b4ace7161c84cf067d444381a009 Reviewed-on: https://go-review.googlesource.com/36255 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Caleb Spare <cespare@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/src/time/zoneinfo_read.go b/src/time/zoneinfo_read.go index 19cd40d..1b3356e 100644 --- a/src/time/zoneinfo_read.go +++ b/src/time/zoneinfo_read.go
@@ -188,7 +188,7 @@ // Fill in the cache with information about right now, // since that will be the most common lookup. - sec, _ := now() + sec, _, _ := now() for i := range tx { if tx[i].when <= sec && (i+1 == len(tx) || sec < tx[i+1].when) { l.cacheStart = tx[i].when