We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dbc373 commit 0747142Copy full SHA for 0747142
src/libstd/sys/unix/time.rs
@@ -111,7 +111,7 @@ mod inner {
111
// Nano calculations can't overflow because nanos are <1B which fit
112
// in a u32.
113
let mut usec = (other.subsec_nanos() / 1000) + self.t.tv_usec as u32;
114
- if usec > USEC_PER_SEC as u32 {
+ if usec >= USEC_PER_SEC as u32 {
115
usec -= USEC_PER_SEC as u32;
116
secs = secs.checked_add(1).expect("overflow when adding \
117
duration to time");
0 commit comments