about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2015-12-18 13:29:49 +0100
committerFlorian Hahn <flo@fhahn.com>2015-12-29 16:07:01 +0100
commite27cbeff370897b8450caa204c08049651a10c13 (patch)
tree471ed007f694634c94b22bfcc5ff4aa2bcc8be16 /src/libstd/sync
parent27a1834ce522e3ec7fe4726b1661de16ee30c503 (diff)
downloadrust-e27cbeff370897b8450caa204c08049651a10c13.tar.gz
rust-e27cbeff370897b8450caa204c08049651a10c13.zip
Fix warnings when compiling stdlib with --test
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/condvar.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index d817a261f7c..1f7fe820bf8 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -510,15 +510,15 @@ mod tests {
         static M: StaticMutex = StaticMutex::new();
 
         let g = M.lock().unwrap();
-        let (g, _no_timeout) = C.wait_timeout_ms(g, 1).unwrap();
+        let (g, _no_timeout) = C.wait_timeout(g, Duration::from_millis(1)).unwrap();
         // spurious wakeups mean this isn't necessarily true
         // assert!(!no_timeout);
         let _t = thread::spawn(move || {
             let _g = M.lock().unwrap();
             C.notify_one();
         });
-        let (g, no_timeout) = C.wait_timeout_ms(g, u32::MAX).unwrap();
-        assert!(no_timeout);
+        let (g, timeout_res) = C.wait_timeout(g, Duration::from_millis(u32::MAX as u64)).unwrap();
+        assert!(!timeout_res.timed_out());
         drop(g);
         unsafe { C.destroy(); M.destroy(); }
     }