Sleeps for the specified amount of time.
(dur: Duration)
| 4 | |
| 5 | /// Sleeps for the specified amount of time. |
| 6 | pub fn sleep(dur: Duration) -> Wait { |
| 7 | Timer::after(dur).wait() |
| 8 | } |
| 9 | |
| 10 | /// Sleeps until the specified instant. |
| 11 | pub fn sleep_until(deadline: Instant) -> Wait { |