diff options
author | Ben Bridle <bridle.benjamin@gmail.com> | 2025-07-03 15:08:31 +1200 |
---|---|---|
committer | Ben Bridle <bridle.benjamin@gmail.com> | 2025-07-03 15:08:31 +1200 |
commit | 9bb58a8557f5000489769e839dbab03d6f71c777 (patch) | |
tree | f74ab3741ac80938e189ff2ade574ca43aca3a7c | |
parent | 7a2218ed5c86813e2531db10ae69d78d97cf0685 (diff) | |
download | phosphor-9bb58a8557f5000489769e839dbab03d6f71c777.zip |
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.
-rw-r--r-- | src/phosphor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |