about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-07-30 20:07:41 -0700
committerBrian Anderson <banderson@mozilla.com>2014-08-13 11:31:47 -0700
commit63cd4acf535f8df177459559fe2d7e6ab390c6d8 (patch)
tree4f10ee436e87176f9141071d2a7a13d5ee499ba8 /src/libstd/task.rs
parent734834c7d6e4862c8348a8c9660bb338773047ca (diff)
downloadrust-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.rs3
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));
 }