Allow a bit of sloppiness in the timeout test

This commit is contained in:
Alex Crichton 2017-01-08 20:25:51 -08:00
parent 9294b1345c
commit f77fe7d3b5

View File

@ -21,7 +21,7 @@ fn smoke() {
let timeout = t!(Timeout::new(dur, &l.handle()));
let start = Instant::now();
t!(l.run(timeout));
assert!(start.elapsed() >= dur);
assert!(start.elapsed() >= (dur / 2));
}
#[test]