From 52c4bf5ae9190005b65473fb583b63175e156bc6 Mon Sep 17 00:00:00 2001 From: Avii Date: Thu, 6 Aug 2026 10:40:51 +0200 Subject: [PATCH] 1786005651 --- src/trekstor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/trekstor.rs b/src/trekstor.rs index 68f67bb..fb09bbd 100644 --- a/src/trekstor.rs +++ b/src/trekstor.rs @@ -39,6 +39,7 @@ impl Trekstor { loop { self.input.handle_event(); self.current_time = Instant::now(); + self.last_time = self.current_time; let dt = self.current_time - self.last_time; println!("FPS: {}", dt.as_millis()); @@ -50,8 +51,6 @@ impl Trekstor { self.screen.flush(); self.input.finish(); - self.last_time = self.current_time; - let dt = self.current_time - self.last_time; if dt < self.update_timestep { sleep(self.update_timestep - dt); }