diff --git a/src/bin/platformer/main.rs b/src/bin/platformer/main.rs index a89fdc8..c8e97f5 100644 --- a/src/bin/platformer/main.rs +++ b/src/bin/platformer/main.rs @@ -336,19 +336,19 @@ async fn main () -> Result <()> { graphics.draw (&game_state, &mut gl_state, &level, &camera); graphics.frames += 1; - if graphics.frames == next_mpf_print { + if graphics.frames == next_upf_print { let now = Instant::now (); - let mpf = (now - last_mpf_instant).as_millis () / 60; + let upf = (now - last_upf_instant).as_micros () / 60; - dbg! (mpf); + dbg! (upf); - next_mpf_print += 60; - last_mpf_instant = now; + next_upf_print += 60; + last_upf_instant = now; } window.gl_swap_window (); - tokio::time::sleep (Duration::from_millis (15)).await; + tokio::time::sleep (Duration::from_millis (10)).await; } Ok (())