Skip to content
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

Fix issue #658 duration_round by zero panics #659

Merged
merged 2 commits into from Mar 21, 2022
Merged

Conversation

ARBaart
Copy link
Contributor

@ARBaart ARBaart commented Mar 21, 2022

The duration_round function does a remainder operation which panics when called with 0. Rounding by zero should (reasoning from rounding by ever smaller durations) just return the original value itself.

This PR implements that and adds two tests that failed (panicked) in the old case and succeed now.

@djc djc merged commit 9a5f76c into chronotope:main Mar 21, 2022
@djc
Copy link
Contributor

djc commented Mar 21, 2022

Thanks!

botahamec pushed a commit to botahamec/chrono that referenced this pull request May 26, 2022
pickfire pushed a commit to pickfire/chrono that referenced this pull request Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants