1786005672
This commit is contained in:
@@ -39,7 +39,6 @@ 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());
|
||||
@@ -54,6 +53,7 @@ impl Trekstor {
|
||||
if dt < self.update_timestep {
|
||||
sleep(self.update_timestep - dt);
|
||||
}
|
||||
self.last_time = self.current_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user