std: Clarify what timers do with zero and negative durations
Add tests. Also fix a bunch of broken time tests.
This commit is contained in:
@@ -664,10 +664,11 @@ mod test {
|
||||
#[test]
|
||||
fn task_abort_no_kill_runtime() {
|
||||
use std::io::timer;
|
||||
use time::Duration;
|
||||
use mem;
|
||||
|
||||
let tb = TaskBuilder::new();
|
||||
let rx = tb.try_future(proc() {});
|
||||
mem::drop(rx);
|
||||
timer::sleep_ms(1000);
|
||||
timer::sleep(Duration::milliseconds(1000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user