Skip to content

Commit f48e67d

Browse files
authored
div-ceil (#21)
1 parent a4f7fa4 commit f48e67d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mod convert {
2121
/// million years.
2222
pub fn millis(duration: Duration) -> u64 {
2323
// Round up.
24-
let millis = (duration.subsec_nanos() + NANOS_PER_MILLI - 1) / NANOS_PER_MILLI;
24+
let millis = duration.subsec_nanos().div_ceil(NANOS_PER_MILLI);
2525
duration
2626
.as_secs()
2727
.saturating_mul(MILLIS_PER_SEC)

0 commit comments

Comments
 (0)