1786005161
This commit is contained in:
@@ -38,8 +38,6 @@ impl Trekstor {
|
||||
pub fn update(&mut self, update: UpdateFn) {
|
||||
loop {
|
||||
self.input.handle_event();
|
||||
self.last_time = self.current_time;
|
||||
self.current_time = Instant::now();
|
||||
let dt = self.current_time - self.last_time;
|
||||
|
||||
println!("Frame");
|
||||
@@ -58,6 +56,9 @@ impl Trekstor {
|
||||
};
|
||||
|
||||
dbg!(dt, self.update_timestep);
|
||||
|
||||
self.last_time = self.current_time;
|
||||
self.current_time = Instant::now();
|
||||
sleep(wait_time);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user