diff options
| author | Saiyed Shizain <saiyedshizain@gmail.com> | 2026-01-19 00:24:01 +0530 |
|---|---|---|
| committer | Saiyed Shizain <saiyedshizain@gmail.com> | 2026-01-19 00:24:01 +0530 |
| commit | 8c84589a5a2203e58b0660b3d596c82dec5d9b15 (patch) | |
| tree | fe1974c476c45640c45daed1d89960c7c8709ff8 /src/pomo/mod.rs | |
| parent | e48781066a5f1d6cb1f75ac97bba352dd7af405a (diff) | |
| download | pomoru-8c84589a5a2203e58b0660b3d596c82dec5d9b15.tar.xz pomoru-8c84589a5a2203e58b0660b3d596c82dec5d9b15.zip | |
manually fixing the shitty code overhaul by gemini
Diffstat (limited to 'src/pomo/mod.rs')
| -rw-r--r-- | src/pomo/mod.rs | 6 |
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); } |