MCPcopy Index your code
hub / github.com/RustPython/RustPython / time_until

Method time_until

crates/stdlib/src/socket.rs:3386–3391  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

3384 }
3385 }
3386 fn time_until(&self) -> Result<Duration, IoOrPyException> {
3387 self.deadline
3388 .checked_duration_since(Instant::now())
3389 // past the deadline already
3390 .ok_or(IoOrPyException::Timeout)
3391 }
3392 }
3393
3394 static DEFAULT_TIMEOUT: AtomicCell<f64> = AtomicCell::new(-1.0);

Callers 2

sock_op_timeout_errMethod · 0.80
sendallMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected