about summary refs log tree commit diff
path: root/src/libstd/time
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-11-30 10:53:20 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-11-30 10:53:20 -0800
commit903444015cc1978a6c940b922e41b0ba6d0172ed (patch)
tree65c63b6b8035114fda019fc392c9ab3f7ae42f90 /src/libstd/time
parent8bc43ed59d24c014ccfe6ed63c6a9afd5e3b811c (diff)
downloadrust-903444015cc1978a6c940b922e41b0ba6d0172ed.tar.gz
rust-903444015cc1978a6c940b922e41b0ba6d0172ed.zip
std: Bump time margin in std::time tests
I believe that because Windows' unit of resolution is 100ns that this unit of
time will ensure that the assertions will hold true as it's representable in the
native format.

cc #29970
Diffstat (limited to 'src/libstd/time')
-rw-r--r--src/libstd/time/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/time/mod.rs b/src/libstd/time/mod.rs
index 261f3e266d7..d400d12e23f 100644
--- a/src/libstd/time/mod.rs
+++ b/src/libstd/time/mod.rs
@@ -235,7 +235,7 @@ mod tests {
             let (a, b) = ($a, $b);
             if a != b {
                 let (a, b) = if a > b {(a, b)} else {(b, a)};
-                assert!(a - Duration::new(0, 1) <= b);
+                assert!(a - Duration::new(0, 100) <= b);
             }
         })
     }