]> Cypherpunks repositories - gostls13.git/commit
runtime: make nanotime use monotonic clock in Solaris
authorJerrin Shaji George <jerrinsg@gmail.com>
Mon, 7 Oct 2019 19:27:33 +0000 (12:27 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 11 Oct 2019 20:01:28 +0000 (20:01 +0000)
commit2df5cdbadf5fbcb23f017c9f00b75dc341a69adf
treeb56a5b279afdaf5e91a2fd4682184639455eef6d
parentc1ccae4d149ac23b376d17fdef486e631a92f775
runtime: make nanotime use monotonic clock in Solaris

nanotime() currently uses the REALTIME clock to get the elapsed
time in Solaris. This commit changes it to use the MONOTONIC clock
instead, similar to how it's done in Linux and other OSs. Also changed
nanotime() and walltime() to call clock_gettime() library function
directly from Go code rather than from assembly.

Fixes #33674

Change-Id: Ie4a687b17d2140998ecd97af6ce048c86cf5fc02
Reviewed-on: https://go-review.googlesource.com/c/go/+/199502
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
src/runtime/os3_solaris.go
src/runtime/sys_solaris_amd64.s
src/runtime/timestub2.go