MCPcopy Create free account
hub / github.com/actix/examples / wait

Method wait

json/jsonrpc/src/main.rs:111–117  ·  view source on GitHub ↗
(&self, d: u64)

Source from the content-addressed store, hash-verified

109 }
110
111 fn wait(&self, d: u64) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn error::Error>>>>> {
112 async move {
113 actix_web::rt::time::sleep(Duration::from_secs(d)).await;
114 Ok(String::from("pong"))
115 }
116 .boxed_local()
117 }
118
119 fn get(&self) -> u32 {
120 self.c

Callers 11

mainFunction · 0.80
join_roomMethod · 0.80
list_roomsMethod · 0.80
startedMethod · 0.80
handleMethod · 0.80
mainFunction · 0.80
startedMethod · 0.80
handleMethod · 0.80
startedMethod · 0.80
handleMethod · 0.80
rpc_selectFunction · 0.80

Calls 1

sleepFunction · 0.85

Tested by

no test coverage detected