]> Cypherpunks repositories - gostls13.git/commit
runtime, time: refactor startNano handling
authorDmitry Vyukov <dvyukov@google.com>
Wed, 31 Oct 2018 16:27:16 +0000 (17:27 +0100)
committerDmitry Vyukov <dvyukov@google.com>
Fri, 2 Nov 2018 12:50:03 +0000 (12:50 +0000)
commita1ee0a21cfd3d44f4585c1eb57698460abbfc7f1
tree6e7c8995841135b34540f25eac5a4a08e18e34ce
parenta86f549703c107c8b4d83d8e7527521c9e215d9a
runtime, time: refactor startNano handling

Move startNano from runtime to time package.
In preparation for a subsequent change that speeds up Since and Until.
This also makes code simpler as we have less assembly as the result,
monotonic time handling is better localized in time package.
This changes values returned from nanotime on windows
(it does not account for startNano anymore), current comments state
that it's important, but it's unclear how it can be important
since no other OS does this.

Update #25729

Change-Id: I2275d57b7b5ed8fd0d53eb0f19d55a86136cc555
Reviewed-on: https://go-review.googlesource.com/c/146340
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/proc.go
src/runtime/sys_windows_386.s
src/runtime/sys_windows_amd64.s
src/runtime/sys_windows_arm.s
src/runtime/time.go
src/runtime/timeasm.go
src/runtime/timestub.go
src/time/sleep.go
src/time/time.go