diff --git a/src/main.rs b/src/main.rs index f81a8ac..803d941 100644 --- a/src/main.rs +++ b/src/main.rs @@ -642,15 +642,16 @@ async fn main() { } }); - let mut app = App::new(prediction_request_in); - app.load(); - let mut events = EventStream::new(); + let mut last_tick = Instant::now(); loop { - terminal.draw(|frame| { app.draw(frame)}).unwrap(); - app.throbber_state.calc_next(); + if last_tick.elapsed() >= std::time::Duration::from_millis(100) { + last_tick = Instant::now(); + app.throbber_state.calc_next(); + } app.scene.direction.time_remaining = app.end_time.signed_duration_since(Utc::now()); + terminal.draw(|frame| { app.draw(frame)}).unwrap(); let delay = Delay::new(std::time::Duration::from_millis(60)).fuse(); let event = events.next().fuse();