Skip to main content

subsecond

Function subsecond 

Source
fn subsecond(v: i64, units: i64, target: i64) -> i32
Expand description

Fractional second of v, counted in units per second, rescaled to target per second. Both scales divide one second evenly, so the conversion is exact when scaling up and truncating when scaling down.