-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Remove and replace misleading Time.wall_to_nanos #1967
Conversation
4c79d64
to
5959c6c
Compare
I believe this breaking change should count as a principle of least surprise bug fix. |
5959c6c
to
d03456a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your reasoning sounds right to me as well, but I'd like some other(s) to agree before merging, since it is a breaking change, and I'm not totally confident that I'm not missing something.
Serialization tests for this failed across the board. I believe its the work that @Praetonus has been doing. Its not clear to me why they failed. |
In particular: It fails for me locally a well but |
The error is
It looks like not every field of I think we should add a more detailed error for those cases, something like |
@Praetonus why does that cause custom serialization to fail? |
Based on its description and name, one would be reasonable in expecting `Time.wall_to_nanos` to take a wall clock time and convert it the number of nanoseconds since the "start of time". That isn't however what it does. It was getting an absolute time to fire a timer setup in Timer.abs. This PR correct this problem by moving the functionality that previously existed in `wall_to_nanos` into Timer as a private method and adds a function to `Nanos` to convert from a wall clock time to nanoseconds.
d03456a
to
104a076
Compare
Pushing fix. |
I agree with @Praetonus that we can do better with that error message. It should be relatively to provide that extra information, because since the refer pass was added, we are setting the |
Based on its description and name, one would be reasonable in expecting
Time.wall_to_nanos
to take a wall clock time and convert it the numberof nanoseconds since the "start of time". That isn't however what it
does. It was getting an absolute time to fire a timer setup in
Timer.abs.
This PR correct this problem by moving the functionality that previously
existed in
wall_to_nanos
into Timer as a private method and adds afunction to
Nanos
to convert from a wall clock time to nanoseconds.