#[cfg(any(feature = "py", feature = "rs"))]
use std::time::Instant;
pub fn s_to_ms<T>(time: T) -> u32
where
T: Into<f64>,
{
(time.into() * 1000.0).round() as u32
}
#[cfg(any(feature = "py", feature = "rs"))]
pub fn time_ms_between(future: Instant, past: Instant) -> u32 {
(future.duration_since(past).as_micros() as f64 / 1000.0).round() as u32
}