summaryrefslogtreecommitdiff
path: root/src/phosphor.rs
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2025-07-03 15:08:31 +1200
committerBen Bridle <bridle.benjamin@gmail.com>2025-07-03 15:08:31 +1200
commit9bb58a8557f5000489769e839dbab03d6f71c777 (patch)
treef74ab3741ac80938e189ff2ade574ca43aca3a7c /src/phosphor.rs
parent7a2218ed5c86813e2531db10ae69d78d97cf0685 (diff)
downloadphosphor-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.
Diffstat (limited to 'src/phosphor.rs')
-rw-r--r--src/phosphor.rs2
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();
}