online-fps
online-fps copied to clipboard
Use float_duration for tracking frame delta times
Right now we have some cumbersome code that converts between std::time::Duration
and an f32
in seconds. This is a natural conflict since most game code wants time represented as an f32
, but std::time::Duration
is far more appropriate to use for engine internals and anything that requires high precision. Fortunately, the float_duration crate already exists to handle this conversion, so we should integrate it and replace our jank custom code.