1
0
Fork 0

x11/window: take render time into account when computing next frame time

This commit is contained in:
William Light 2020-09-15 22:36:42 +02:00
parent c26507c322
commit d5c3ba0bb0

View file

@ -237,7 +237,7 @@ impl Window {
let until_next_frame = if now > next_frame { let until_next_frame = if now > next_frame {
handler.on_frame(); handler.on_frame();
next_frame = now + self.frame_interval; next_frame = Instant::now() + self.frame_interval;
self.frame_interval self.frame_interval
} else { } else {
next_frame - now next_frame - now