Commit 2df5cdba authored by Jerrin Shaji George's avatar Jerrin Shaji George Committed by Ian Lance Taylor
Browse files

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: default avatarAram Hăvărneanu <aram@mgk.ro>
parent c1ccae4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment