-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time: Nanosecond() on Windows return identical value in loop execution #28084
Comments
You may want to try it with go1.11, but by default the platform timer is lower resolution then other system. I can't remember if Alex was successful in integrating the high res timers or if that turned out to be too expensive. |
I tried with IN_TIMES=100
The resolution of timer on Windows is not good. And Go's runtime adjusts this resolution internally so you probably can not get a fine resolution. (AFAIK) |
Seems like that. @alexbrainman for further comments. We can close this out if this is WAI. |
Yes, what everyone else said. Windows clock does not provides resolution in nanoseconds. Alex |
Seems like WAI. Closing. |
What version of Go are you using (
go version
)?1.9.4
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?Build Windows executable on Mac, and run the executable on Windows
What did you do?
What did you expect to see?
Except to see different output nasosecond value
What did you see instead?
See identical output:
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
current time nano: 9116500
The text was updated successfully, but these errors were encountered: