Lines Matching full:sleep
7 use tokio::time::{self, Duration, Instant, Sleep};
66 let sleep = rng.gen_range(Duration::from_secs(0)..Duration::from_secs(1)); in paused_time_stress_run() localVariable
67 time::sleep(sleep).await; in paused_time_stress_run()
76 time::sleep(ms(1)).await; in advance_after_poll()
80 let mut sleep = task::spawn(time::sleep_until(start + ms(300))); in advance_after_poll() localVariable
82 assert_pending!(sleep.poll()); in advance_after_poll()
88 assert_pending!(sleep.poll()); in advance_after_poll()
98 let mut sleep = task::spawn(time::sleep_until(start + ms(300))); in sleep_no_poll() localVariable
104 assert_pending!(sleep.poll()); in sleep_no_poll()
114 sleep: Pin<Box<Sleep>>, field
127 assert_pending!(self.sleep.as_mut().poll(cx)); in poll()
144 assert_pending!(self.sleep.as_mut().poll(cx)); in poll()
159 let sleep = Box::pin(time::sleep_until(start + ms(300))); in sleep_same_task() localVariable
162 sleep, in sleep_same_task()
177 let sleep = Box::pin(time::sleep_until(start + ms(300))); in sleep_same_task_no_poll() localVariable
180 sleep, in sleep_same_task_no_poll()
263 let mut sleep = task::spawn(time::sleep_until(start + Duration::from_secs(60))); in regression_3710_with_submillis_advance() localVariable
265 assert_pending!(sleep.poll()); in regression_3710_with_submillis_advance()
272 assert_pending!(sleep.poll()); in regression_3710_with_submillis_advance()
293 let mut sleep = task::spawn(time::sleep(Duration::from_millis(1))); in advance_once_with_timer() localVariable
294 assert_pending!(sleep.poll()); in advance_once_with_timer()
297 assert_pending!(sleep.poll()); in advance_once_with_timer()
301 assert!(sleep.is_woken()); in advance_once_with_timer()
302 assert_ready!(sleep.poll()); in advance_once_with_timer()
308 // time::sleep(Duration::from_millis(1)).await; in advance_multi_with_timer()
310 let mut sleep = task::spawn(time::sleep(Duration::from_millis(1))); in advance_multi_with_timer() localVariable
311 assert_pending!(sleep.poll()); in advance_multi_with_timer()
314 assert_pending!(sleep.poll()); in advance_multi_with_timer()
317 assert_pending!(sleep.poll()); in advance_multi_with_timer()
320 assert_pending!(sleep.poll()); in advance_multi_with_timer()
323 assert!(sleep.is_woken()); in advance_multi_with_timer()
324 assert_ready!(sleep.poll()); in advance_multi_with_timer()