Skip to content

Commit 9034440

Browse files
committed
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
1 parent 8bc43ed commit 9034440

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/time/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ mod tests {
235235
let (a, b) = ($a, $b);
236236
if a != b {
237237
let (a, b) = if a > b {(a, b)} else {(b, a)};
238-
assert!(a - Duration::new(0, 1) <= b);
238+
assert!(a - Duration::new(0, 100) <= b);
239239
}
240240
})
241241
}

0 commit comments

Comments
 (0)