You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go version go1.7rc3 windows/amd64
There is no access to monotonic time in standard Go library, but there is private function runtime.nanotime. Please make it public (as System.nanoTime in Java) because time.Now is not monotonic and can be changed during probe (by user or by ntp server sync).
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
Please expose runtime.nanotime
runtime: please expose nanotime
Aug 10, 2016
This seems reasonable to me but I think the question is whether it should be in the time package in the standard library or in some external repository.
time.Nanotime() is better to read but can lead to confusion of monotonic time and real time.
External package will require maintaining of two copies of identical code because nanotime is already implemented in runtime package.
I think runtime.Nanotime() if starting point is program start or os.Nanotime() if starting point is os boot.
go version go1.7rc3 windows/amd64
There is no access to monotonic time in standard Go library, but there is private function
runtime.nanotime
. Please make it public (asSystem.nanoTime
in Java) becausetime.Now
is not monotonic and can be changed during probe (by user or by ntp server sync).The text was updated successfully, but these errors were encountered: