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: Now() faster than reported timestamps from filesystem #33510
Comments
Hello @taoyuanyuan, thank you for filing this issue! In between the times reported, we need to account for those missing 1433.25 microseconds. I suggest that perhaps if such file time comparisons are tripping up your workflow, that perhaps you invoke I can reproduce this too on my Linux box on the first try. Kindly pinging @ianlancetaylor @ALTree @randall77 @aclements to help check over my hypothesis/suggestion and feel free to correct me. |
Never mind, it was just hidden in the HTML details, sorry for the false alarm asking you to fill out the template |
I get the same behavior from a C program:
Prints after some time:
So I don't think there's any bug here. Or if there is, it is the kernel not Go. |
This does seem to be how the Linux kernel works. The implementation of Closing because there is nothing we can do to fix this in the Go toolchain. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
time.Now() faster than current system time
output:
stat file:
What did you expect to see?
time.Now() returns the current system time
What did you see instead?
time.Now() faster than current system time
The text was updated successfully, but these errors were encountered: