]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/thread/mod.rs
Auto merge of #30641 - tsion:match-range, r=eddyb
[rust.git] / src / libstd / thread / mod.rs
index 0e525f394216c9bdadef5d415f8e40e54fd16a9b..116cd5da2ce7b273a4cfc8ad07d0154e43b84dc0 100644 (file)
@@ -830,14 +830,14 @@ fn test_try_panic_message_unit_struct() {
     fn test_park_timeout_unpark_before() {
         for _ in 0..10 {
             thread::current().unpark();
-            thread::park_timeout_ms(u32::MAX);
+            thread::park_timeout(Duration::from_millis(u32::MAX as u64));
         }
     }
 
     #[test]
     fn test_park_timeout_unpark_not_called() {
         for _ in 0..10 {
-            thread::park_timeout_ms(10);
+            thread::park_timeout(Duration::from_millis(10));
         }
     }
 
@@ -847,17 +847,17 @@ fn test_park_timeout_unpark_called_other_thread() {
             let th = thread::current();
 
             let _guard = thread::spawn(move || {
-                super::sleep_ms(50);
+                super::sleep(Duration::from_millis(50));
                 th.unpark();
             });
 
-            thread::park_timeout_ms(u32::MAX);
+            thread::park_timeout(Duration::from_millis(u32::MAX as u64));
         }
     }
 
     #[test]
     fn sleep_ms_smoke() {
-        thread::sleep_ms(2);
+        thread::sleep(Duration::from_millis(2));
     }
 
     // NOTE: the corresponding test for stderr is in run-pass/thread-stderr, due