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:
Brian Anderson
2014-07-30 20:07:41 -07:00
parent 734834c7d6
commit 63cd4acf53
6 changed files with 111 additions and 31 deletions

View File

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