MCPcopy Create free account
hub / github.com/bytecodealliance/wstd / sleep

Function sleep

src/task.rs:6–8  ·  view source on GitHub ↗

Sleeps for the specified amount of time.

(dur: Duration)

Source from the content-addressed store, hash-verified

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

Callers 9

cooperative_concurrencyFunction · 0.85
into_futureMethod · 0.85
mainFunction · 0.85
just_sleepFunction · 0.85
new_with_configMethod · 0.85
get_listening_addressFunction · 0.85
http_wait_responseFunction · 0.85
http_wait_bodyFunction · 0.85
http_stream_bodyFunction · 0.85

Calls 1

waitMethod · 0.80

Tested by 2

cooperative_concurrencyFunction · 0.68
get_listening_addressFunction · 0.68