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

Function get_clock_time

crates/vm/src/stdlib/time.rs:1182–1185  ·  view source on GitHub ↗
(clk_id: ClockId, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1180 }
1181
1182 fn get_clock_time(clk_id: ClockId, vm: &VirtualMachine) -> PyResult<Duration> {
1183 let ts = nix::time::clock_gettime(clk_id).map_err(|e| e.into_pyexception(vm))?;
1184 Ok(ts.into())
1185 }
1186
1187 #[pyfunction]
1188 fn clock_gettime(clk_id: ClockId, vm: &VirtualMachine) -> PyResult<f64> {

Callers 6

clock_gettimeFunction · 0.85
clock_gettime_nsFunction · 0.85
get_monotonic_timeFunction · 0.85
get_perf_timeFunction · 0.85
get_thread_timeFunction · 0.85
get_process_timeFunction · 0.85

Calls 2

clock_gettimeFunction · 0.85
into_pyexceptionMethod · 0.45

Tested by

no test coverage detected