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

Function clock_gettime

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

Source from the content-addressed store, hash-verified

1186
1187 #[pyfunction]
1188 fn clock_gettime(clk_id: ClockId, vm: &VirtualMachine) -> PyResult<f64> {
1189 get_clock_time(clk_id, vm).map(|d| d.as_secs_f64())
1190 }
1191
1192 #[pyfunction]
1193 fn clock_gettime_ns(clk_id: ClockId, vm: &VirtualMachine) -> PyResult<u128> {

Callers 1

get_clock_timeFunction · 0.85

Calls 2

get_clock_timeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected