diff options
Diffstat (limited to 'src/app/runtime.rs')
| -rw-r--r-- | src/app/runtime.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/app/runtime.rs b/src/app/runtime.rs index b6ad806b..739a3670 100644 --- a/src/app/runtime.rs +++ b/src/app/runtime.rs @@ -1,4 +1,4 @@ -use std::time::Instant; +use std::time::{Duration, Instant}; use crossterm::terminal; @@ -171,9 +171,16 @@ impl App { } pub(crate) fn sync_animation_timer(&mut self, now: Instant) { + self.sync_animation_timer_with_interval(now, ANIMATION_INTERVAL); + } + + pub(crate) fn sync_headless_animation_timer(&mut self, now: Instant) { + self.sync_animation_timer_with_interval(now, crate::app::HEADLESS_ANIMATION_INTERVAL); + } + + fn sync_animation_timer_with_interval(&mut self, now: Instant, interval: Duration) { if self.agent_panel_has_animation() { - self.next_animation_tick - .get_or_insert(now + ANIMATION_INTERVAL); + self.next_animation_tick.get_or_insert(now + interval); } else { self.next_animation_tick = None; } |
