@@ -402,18 +402,18 @@ pub fn park() {
402
402
/// the specified duration has been reached (may wake spuriously).
403
403
///
404
404
/// The semantics of this function are equivalent to `park()` except that the
405
- /// thread will be blocked for roughly no longer than dur . This method
405
+ /// thread will be blocked for roughly no longer than *duration* . This method
406
406
/// should not be used for precise timing due to anomalies such as
407
407
/// preemption or platform differences that may not cause the maximum
408
- /// amount of time waited to be precisely dur
408
+ /// amount of time waited to be precisely *duration* long.
409
409
///
410
410
/// See the module doc for more detail.
411
411
#[ unstable( feature = "std_misc" , reason = "recently introduced, depends on Duration" ) ]
412
- pub fn park_timeout ( dur : Duration ) {
412
+ pub fn park_timeout ( duration : Duration ) {
413
413
let thread = current ( ) ;
414
414
let mut guard = thread. inner . lock . lock ( ) . unwrap ( ) ;
415
415
if !* guard {
416
- let ( g, _) = thread. inner . cvar . wait_timeout ( guard, dur ) . unwrap ( ) ;
416
+ let ( g, _) = thread. inner . cvar . wait_timeout ( guard, duration ) . unwrap ( ) ;
417
417
guard = g;
418
418
}
419
419
* guard = false ;
@@ -502,11 +502,11 @@ impl Thread {
502
502
/// Deprecated: use module-level free function.
503
503
#[ deprecated( since = "1.0.0" , reason = "use module-level free function" ) ]
504
504
#[ unstable( feature = "std_misc" , reason = "recently introduced" ) ]
505
- pub fn park_timeout ( dur : Duration ) {
505
+ pub fn park_timeout ( duration : Duration ) {
506
506
let thread = current ( ) ;
507
507
let mut guard = thread. inner . lock . lock ( ) . unwrap ( ) ;
508
508
if !* guard {
509
- let ( g, _) = thread. inner . cvar . wait_timeout ( guard, dur ) . unwrap ( ) ;
509
+ let ( g, _) = thread. inner . cvar . wait_timeout ( guard, duration ) . unwrap ( ) ;
510
510
guard = g;
511
511
}
512
512
* guard = false ;
0 commit comments