about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-06 09:42:17 +0000
committerbors <bors@rust-lang.org>2015-11-06 09:42:17 +0000
commit6878fce9c707dd7449df1981303dfc2c1fedabab (patch)
treec40ef568e55faaf938901bff4928e21724bf0c4e /src
parent02d9f294558da746e8c5707f13cd9153d3ac5f40 (diff)
parenta2efa2aa291c938200da59b89b14214c8d2c70ba (diff)
downloadrust-6878fce9c707dd7449df1981303dfc2c1fedabab.tar.gz
rust-6878fce9c707dd7449df1981303dfc2c1fedabab.zip
Auto merge of #29604 - bstrie:de_ms, r=alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/compiletest/runtest.rs2
-rw-r--r--src/libstd/sync/condvar.rs3
-rw-r--r--src/libstd/thread/mod.rs2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 8db6725f7a8..8042e2f966c 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -430,7 +430,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                 .expect(&format!("failed to exec `{:?}`", config.adb_path));
             loop {
                 //waiting 1 second for gdbserver start
-                ::std::thread::sleep_ms(1000);
+                ::std::thread::sleep(::std::time::Duration::new(1,0));
                 if TcpStream::connect("127.0.0.1:5039").is_ok() {
                     break
                 }
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 1b32515e9f7..7a80a202dd9 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -167,6 +167,8 @@ impl Condvar {
     /// Like `wait`, the lock specified will be re-acquired when this function
     /// returns, regardless of whether the timeout elapsed or not.
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[deprecated(since = "1.6.0", reason = "replaced by `std::sync::Condvar::wait_timeout`")]
+    #[allow(deprecated)]
     pub fn wait_timeout_ms<'a, T>(&self, guard: MutexGuard<'a, T>, ms: u32)
                                   -> LockResult<(MutexGuard<'a, T>, bool)> {
         unsafe {
@@ -289,6 +291,7 @@ impl StaticCondvar {
     #[unstable(feature = "static_condvar",
                reason = "may be merged with Condvar in the future",
                issue = "27717")]
+    #[deprecated(since = "1.6.0", reason = "replaced by `std::sync::StaticCondvar::wait_timeout`")]
     pub fn wait_timeout_ms<'a, T>(&'static self, guard: MutexGuard<'a, T>, ms: u32)
                                   -> LockResult<(MutexGuard<'a, T>, bool)> {
         match self.wait_timeout(guard, Duration::from_millis(ms as u64)) {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 9b8f63997b6..75e3a52feea 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -390,6 +390,7 @@ pub fn catch_panic<F, R>(f: F) -> Result<R>
 /// this function will not return early due to a signal being received or a
 /// spurious wakeup.
 #[stable(feature = "rust1", since = "1.0.0")]
+#[deprecated(since = "1.6.0", reason = "replaced by `std::thread::sleep`")]
 pub fn sleep_ms(ms: u32) {
     sleep(Duration::from_millis(ms as u64))
 }
@@ -456,6 +457,7 @@ pub fn park() {
 ///
 /// See the module doc for more detail.
 #[stable(feature = "rust1", since = "1.0.0")]
+#[deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")]
 pub fn park_timeout_ms(ms: u32) {
     park_timeout(Duration::from_millis(ms as u64))
 }