(ticks: i64, mul: i64, div: i64)
| 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> { |
no outgoing calls
no test coverage detected