aboutsummaryrefslogtreecommitdiff
path: root/src/pomo/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pomo/mod.rs')
-rw-r--r--src/pomo/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pomo/mod.rs b/src/pomo/mod.rs
index b11301f..62aef7a 100644
--- a/src/pomo/mod.rs
+++ b/src/pomo/mod.rs
@@ -28,8 +28,10 @@ impl Pomo {
_ = second_tick.tick() => {
self.tick();
}
- event_res = tokio::task::spawn_blocking(|| event::poll(Duration::from_millis(50))) => {
- if let Ok(Ok(true)) = event_res { // Fixed the mismatched type error
+
+ // Tighten poll to 16ms (~60fps feel) for input responsiveness
+ event_res = tokio::task::spawn_blocking(|| event::poll(Duration::from_millis(16))) => {
+ if let Ok(Ok(true)) = event_res {
if let Ok(Event::Key(key)) = event::read() {
self.handle_key(key);
}