1786005161

This commit is contained in:
2026-08-06 10:32:41 +02:00
parent 9fd4816cfb
commit 3fdb3e6f76

View File

@@ -38,8 +38,6 @@ impl Trekstor {
pub fn update(&mut self, update: UpdateFn) { pub fn update(&mut self, update: UpdateFn) {
loop { loop {
self.input.handle_event(); self.input.handle_event();
self.last_time = self.current_time;
self.current_time = Instant::now();
let dt = self.current_time - self.last_time; let dt = self.current_time - self.last_time;
println!("Frame"); println!("Frame");
@@ -58,6 +56,9 @@ impl Trekstor {
}; };
dbg!(dt, self.update_timestep); dbg!(dt, self.update_timestep);
self.last_time = self.current_time;
self.current_time = Instant::now();
sleep(wait_time); sleep(wait_time);
} }
} }