diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-07-30 20:07:41 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-08-13 11:31:47 -0700 |
| commit | 63cd4acf535f8df177459559fe2d7e6ab390c6d8 (patch) | |
| tree | 4f10ee436e87176f9141071d2a7a13d5ee499ba8 /src/libstd/task.rs | |
| parent | 734834c7d6e4862c8348a8c9660bb338773047ca (diff) | |
| download | rust-63cd4acf535f8df177459559fe2d7e6ab390c6d8.tar.gz rust-63cd4acf535f8df177459559fe2d7e6ab390c6d8.zip | |
std: Clarify what timers do with zero and negative durations
Add tests. Also fix a bunch of broken time tests.
Diffstat (limited to 'src/libstd/task.rs')
| -rw-r--r-- | src/libstd/task.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs index 96036b54e36..9cace9c80ef 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -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)); } |
