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

Function time_muldiv

crates/vm/src/stdlib/time.rs:812–817  ·  view source on GitHub ↗
(ticks: i64, mul: i64, div: i64)

Source from the content-addressed store, hash-verified

810
811 #[cfg(any(windows, all(target_arch = "wasm32", target_os = "emscripten")))]
812 pub(super) fn time_muldiv(ticks: i64, mul: i64, div: i64) -> u64 {
813 let int_part = ticks / div;
814 let ticks = ticks % div;
815 let remaining = (ticks * mul) / div;
816 (int_part * mul + remaining) as u64
817 }
818
819 #[cfg(all(target_arch = "wasm32", target_os = "emscripten"))]
820 fn get_process_time(vm: &VirtualMachine) -> PyResult<Duration> {

Callers 2

get_process_timeFunction · 0.85
get_perf_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected