]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.9] runtime: avoid monotonic time zero on systems with low-res...
authorRuss Cox <rsc@golang.org>
Wed, 25 Oct 2017 15:13:23 +0000 (11:13 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 25 Oct 2017 20:23:44 +0000 (20:23 +0000)
commit9be38a15e486f09663cf324539e2cb5045d54d80
treeb3c544990984c6ecc1d65dfcc6b1cdda2c1b53a2
parent8bb333a9c0945666e7b2e162f85a5fff74ccf1b4
[release-branch.go1.9] runtime: avoid monotonic time zero on systems with low-res timers

Otherwise low-res timers cause problems at call sites that expect to
be able to use 0 as meaning "no time set" and therefore expect that
nanotime never returns 0 itself. For example, sched.lastpoll == 0
means no last poll.

Fixes #22394.

Change-Id: Iea28acfddfff6f46bc90f041ec173e0fea591285
Reviewed-on: https://go-review.googlesource.com/73410
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/73491
TryBot-Result: Russ Cox <rsc@golang.org>
src/runtime/proc.go
src/runtime/time.go