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

Method poll

src/time/mod.rs:101–110  ·  view source on GitHub ↗
(self: Pin<&mut Self>, cx: &mut Context<'_>)

Source from the content-addressed store, hash-verified

99 type Output = Instant;
100
101 fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
102 let this = self.project();
103 match this.wait_for.as_pin_mut() {
104 None => Poll::Pending,
105 Some(f) => match f.poll(cx) {
106 Poll::Pending => Poll::Pending,
107 Poll::Ready(()) => Poll::Ready(Instant::now()),
108 },
109 }
110 }
111}
112
113#[cfg(test)]

Callers 2

poll_frameMethod · 0.45
poll_readyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected