1
Fork 0

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
This commit is contained in:
Alex Crichton 2015-11-30 10:53:20 -08:00
parent 8bc43ed59d
commit 903444015c

View file

@ -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);
}
})
}