-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Ensure two SystemTime
s are equal when nanos add to exactly 1B
#30173
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
Conversation
Currently if you add a duration which should lead to 0 nanos and 1 additional second, we end up with no additional seconds, and 1000000000 nanos.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Some tidy errors: https://travis-ci.org/rust-lang/rust/builds/94495543#L509 Looks good to me other than that though. |
Gah oops, thanks @sgrif! |
Made tidy! |
Hopefully I can remove this tomorrow, but I don't want a red build until then.
⌛ Testing commit a59cd36 with merge 354f74e... |
💔 Test failed - auto-mac-64-nopt-t |
Ah right, the added test is invalid on mac/ios, as it doesn't have nanosecond precision. Does it make sense to just cfg it out on that platform? |
Those platforms don't support nanosecond precision, so adding 1 nanosecond does nothing.
Tests should be passing on all platforms now |
@bors r+ |
📌 Commit 5dbc373 has been approved by |
⌛ Testing commit 5dbc373 with merge 2a33a32... |
💔 Test failed - auto-mac-64-nopt-t |
Well, there is still a completely valid bug here on Mac. I will fix in the On Thu, Dec 3, 2015, 6:42 PM bors [email protected] wrote:
|
I think the same |
Updated. |
⌛ Testing commit 0747142 with merge 55a4e05... |
Currently if you add a duration which should lead to 0 nanos and 1 additional second, we end up with no additional seconds, and 1000000000 nanos.
Currently if you add a duration which should lead to 0 nanos and 1
additional second, we end up with no additional seconds, and 1000000000
nanos.