This PR is to implement Duration::round along with some other updates and ideally basic tests as well. The hope is to have this implemented and tested so that it can be used to switch over the internal duration slots from f64 to i32. 😄
A couple notes:
I ended up switching rounding back to f64 for now / this PR. It had been u64, and my goal for the next PR is to head back in that direction. The truncation of values between integer types was causing some havoc and making debugging more difficult than it needed to be while dealing with round.
Currently, the only testing is for floor rounding, but this can be added to if desired.
Currently a WIP.EDIT: this is ready for review!This PR is to implement
Duration::round
along with some other updates and ideally basic tests as well. The hope is to have this implemented and tested so that it can be used to switch over the internal duration slots fromf64
toi32
. 😄A couple notes:
round
.floor
rounding, but this can be added to if desired.