@@ -467,6 +467,7 @@ pub fn catch_panic<F, R>(f: F) -> Result<R>
467
467
/// specifics or platform-dependent functionality. Note that on unix platforms
468
468
/// this function will not return early due to a signal being received or a
469
469
/// spurious wakeup.
470
+ #[ deprecated( since = "1.4.0" , reason = "use `thread::sleep` instead" ) ]
470
471
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
471
472
pub fn sleep_ms ( ms : u32 ) {
472
473
sleep ( Duration :: from_millis ( ms as u64 ) )
@@ -483,7 +484,7 @@ pub fn sleep_ms(ms: u32) {
483
484
/// signal being received or a spurious wakeup. Platforms which do not support
484
485
/// nanosecond precision for sleeping will have `dur` rounded up to the nearest
485
486
/// granularity of time they can sleep for.
486
- #[ unstable ( feature = "thread_sleep" , reason = "waiting on Duration " ) ]
487
+ #[ stable ( feature = "thread_sleep" , since = "1.4.0 " ) ]
487
488
pub fn sleep ( dur : Duration ) {
488
489
imp:: Thread :: sleep ( dur)
489
490
}
@@ -533,6 +534,7 @@ pub fn park() {
533
534
/// amount of time waited to be precisely *ms* long.
534
535
///
535
536
/// See the module doc for more detail.
537
+ #[ deprecated( since = "1.4.0" , reason = "use `thread::park_timeout` instead" ) ]
536
538
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
537
539
pub fn park_timeout_ms ( ms : u32 ) {
538
540
park_timeout ( Duration :: from_millis ( ms as u64 ) )
@@ -553,7 +555,7 @@ pub fn park_timeout_ms(ms: u32) {
553
555
///
554
556
/// Platforms which do not support nanosecond precision for sleeping will have
555
557
/// `dur` rounded up to the nearest granularity of time they can sleep for.
556
- #[ unstable ( feature = "park_timeout" , reason = "waiting on Duration " ) ]
558
+ #[ stable ( feature = "park_timeout" , since = "1.4.0 " ) ]
557
559
pub fn park_timeout ( dur : Duration ) {
558
560
let thread = current ( ) ;
559
561
let mut guard = thread. inner . lock . lock ( ) . unwrap ( ) ;
0 commit comments