Skip to content

Commit d0a4d79

Browse files
committed
sleep_until test condition loosened
1 parent b752788 commit d0a4d79

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

library/std/tests/thread.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ fn sleep_until() {
2424
let deadline = now + period;
2525
thread::sleep_until(deadline);
2626

27-
let margin = Duration::from_micros(100);
2827
let elapsed = now.elapsed();
29-
assert!(
30-
(period..period + margin).contains(&elapsed),
31-
"elapsed: {} microseconds, expected 100_000 to 100_100",
32-
elapsed.as_micros()
33-
);
28+
assert!(elapsed >= period);
3429
}

0 commit comments

Comments
 (0)