File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ fn check_conditional_variables_timed_wait_timeout() {
63
63
let cvar = Condvar :: new ( ) ;
64
64
let guard = lock. lock ( ) . unwrap ( ) ;
65
65
let now = Instant :: now ( ) ;
66
- let ( _guard, timeout) = cvar. wait_timeout ( guard, Duration :: from_millis ( 100 ) ) . unwrap ( ) ;
66
+ let ( _guard, timeout) = cvar. wait_timeout ( guard, Duration :: from_millis ( 10 ) ) . unwrap ( ) ;
67
67
assert ! ( timeout. timed_out( ) ) ;
68
68
let elapsed_time = now. elapsed ( ) . as_millis ( ) ;
69
- assert ! ( 100 <= elapsed_time && elapsed_time <= 1000 ) ;
69
+ assert ! ( 10 <= elapsed_time && elapsed_time <= 1000 ) ;
70
70
}
71
71
72
72
/// Test that signaling a conditional variable when waiting with a timeout works
@@ -79,7 +79,7 @@ fn check_conditional_variables_timed_wait_notimeout() {
79
79
let guard = lock. lock ( ) . unwrap ( ) ;
80
80
81
81
let handle = thread:: spawn ( move || {
82
- thread:: sleep ( Duration :: from_millis ( 100 ) ) ; // Make sure the other thread is waiting by the time we call `notify`.
82
+ thread:: sleep ( Duration :: from_millis ( 1 ) ) ; // Make sure the other thread is waiting by the time we call `notify`.
83
83
let ( _lock, cvar) = & * pair2;
84
84
cvar. notify_one ( ) ;
85
85
} ) ;
You can’t perform that action at this time.
0 commit comments