From d5c3ba0bb01bf843a959abbbd14aa199d103579a Mon Sep 17 00:00:00 2001 From: William Light Date: Tue, 15 Sep 2020 22:36:42 +0200 Subject: [PATCH] x11/window: take render time into account when computing next frame time --- src/x11/window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11/window.rs b/src/x11/window.rs index 952424e..c7cd911 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -237,7 +237,7 @@ impl Window { let until_next_frame = if now > next_frame { handler.on_frame(); - next_frame = now + self.frame_interval; + next_frame = Instant::now() + self.frame_interval; self.frame_interval } else { next_frame - now