]> Cypherpunks repositories - gostls13.git/commit
runtime: use QPC for nanotime and time.now on windows/arm go1.12beta1
authorJordan Rhee <jordanrh@microsoft.com>
Tue, 18 Dec 2018 20:54:23 +0000 (12:54 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 18 Dec 2018 23:01:06 +0000 (23:01 +0000)
commite3b4b7baad555f74b6fbc0ddc00d46ed0ac03a0a
tree9b67e4b0bd73d150289a8e5decaae8b56fc78e1f
parent9ded8b0e97588895e00e93299e4a4a748cfa3a4b
runtime: use QPC for nanotime and time.now on windows/arm

The previous implementation of nanotime and time.now used a time source
that was updated on the system clock tick, which has a maximum
resolution of about 1ms. On 386 and amd64, this time source maps to
the system performance counter, so has much higher resolution.
On ARM, use QueryPerformanceCounter() to get a high resolution timestamp.

Updates #26148

Change-Id: I1abc99baf927a95b472ac05020a7788626c71d08
Reviewed-on: https://go-review.googlesource.com/c/154758
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/os_windows.go
src/runtime/sys_windows_arm.s