Skip to main content

py_millis_to_nanos

Function py_millis_to_nanos 

Source
pub fn py_millis_to_nanos(millis: f64) -> PyResult<u64>
Expand description

Converts milliseconds (ms) to nanoseconds (ns), rounding to the nearest nanosecond.

Returns 0 for a negative input.

ยงErrors

Returns an error if millis is non-finite or cannot be represented as u64 nanoseconds.