MCPcopy Create free account
hub / github.com/Recordscript/recordscript / timeout

Function timeout

libs/hbb_common/src/lib.rs:97–99  ·  view source on GitHub ↗
(ms: u64, future: T)

Source from the content-addressed store, hash-verified

95
96#[inline]
97pub fn timeout<T: std::future::Future>(ms: u64, future: T) -> tokio::time::Timeout<T> {
98 tokio::time::timeout(std::time::Duration::from_millis(ms), future)
99}
100
101pub type ResultType<F, E = anyhow::Error> = anyhow::Result<F, E>;
102

Callers 7

new_proxyMethod · 0.85
next_timeoutMethod · 0.85
test_targetFunction · 0.85
newMethod · 0.85
send_bytesMethod · 0.85
next_timeoutMethod · 0.85
connectMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_targetFunction · 0.68