1 2 3 4 5 6 7 8
//! Generally useful functions and constants use std::time::Duration; /// Mildly pointless, but returns the count of MS per frame for a given frame rate pub fn ms_per_frame(fps: u32) -> Duration { Duration::from_millis(1000) / fps }