about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-12-04 09:49:35 -0700
committerSean Griffin <sean@seantheprogrammer.com>2015-12-04 09:49:35 -0700
commit07471423a29bd4508a0552d4b9cfb104ca2a5928 (patch)
tree71157ffeec89aae2906629583957e0215190da48 /src/libstd/sys
parent5dbc373f708fb203a354f2b6b08009c28d694244 (diff)
downloadrust-07471423a29bd4508a0552d4b9cfb104ca2a5928.tar.gz
rust-07471423a29bd4508a0552d4b9cfb104ca2a5928.zip
Fix the time overflow on mac as well
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/time.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/time.rs b/src/libstd/sys/unix/time.rs
index cc026b8fd10..a07c30d9648 100644
--- a/src/libstd/sys/unix/time.rs
+++ b/src/libstd/sys/unix/time.rs
@@ -111,7 +111,7 @@ mod inner {
             // Nano calculations can't overflow because nanos are <1B which fit
             // in a u32.
             let mut usec = (other.subsec_nanos() / 1000) + self.t.tv_usec as u32;
-            if usec > USEC_PER_SEC as u32 {
+            if usec >= USEC_PER_SEC as u32 {
                 usec -= USEC_PER_SEC as u32;
                 secs = secs.checked_add(1).expect("overflow when adding \
                                                    duration to time");