From 9bb58a8557f5000489769e839dbab03d6f71c777 Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Thu, 3 Jul 2025 15:08:31 +1200 Subject: Reduce minimum frame duration to 10 microseconds The previous duration of 1 millisecond was noticeably long when drawing frames at greater than 60 frames a second. --- src/phosphor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/phosphor.rs') diff --git a/src/phosphor.rs b/src/phosphor.rs index 00d391a..34d5be5 100644 --- a/src/phosphor.rs +++ b/src/phosphor.rs @@ -198,7 +198,7 @@ impl ApplicationHandler for PhosphorApplication { } // Ensure a minimum duration between frames. - const MINIMUM_WAIT: Duration = Duration::from_millis(1); + const MINIMUM_WAIT: Duration = Duration::from_micros(10); std::thread::sleep(MINIMUM_WAIT.saturating_sub(self.frame_start.elapsed())); self.frame_start = Instant::now(); } -- cgit v1.2.3-70-g09d2