diff --git a/src/main.rs b/src/main.rs index e2f5e34..ed85d80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,9 @@ pub struct App { impl App { fn start(&mut self, ctx: &Context) { self.cancel(); // Cancel any existing timeout - self.timer.current_round = 1; + if self.timer.current_round >= self.timer.rounds { + self.timer.current_round = 1; + } let start_time = Date::now(); self.next_tick_time = start_time + 100.0; // Schedule first tick after 100ms self.timer.running = true;