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

Function clock_settime_ns

crates/vm/src/stdlib/time.rs:1231–1234  ·  view source on GitHub ↗
(clk_id: ClockId, time: libc::time_t, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1229 #[cfg_attr(target_env = "musl", allow(deprecated))]
1230 #[pyfunction]
1231 fn clock_settime_ns(clk_id: ClockId, time: libc::time_t, vm: &VirtualMachine) -> PyResult<()> {
1232 let ts = Duration::from_nanos(time as _).into();
1233 set_clock_time(clk_id, ts, vm)
1234 }
1235
1236 // Requires all CLOCK constants available and clock_getres
1237 #[cfg(any(

Callers

nothing calls this directly

Calls 1

set_clock_timeFunction · 0.85

Tested by

no test coverage detected