Skip to content

Commit

Permalink
Merge pull request Textualize#5465 from Plywood9/fix-timer-busy-loop
Browse files Browse the repository at this point in the history
Fix busy loop on lagging timer
  • Loading branch information
willmcgugan authored Jan 12, 2025
2 parents d373878 + f426c16 commit c4e3f04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textual/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def _run(self) -> None:
next_timer = start + ((count + 1) * _interval)
now = _time.get_time()
if self._skip and next_timer < now:
count += 1
count = int((now - start) / _interval + 1)
continue
now = _time.get_time()
wait_time = max(0, next_timer - now)
Expand Down

0 comments on commit c4e3f04

Please sign in to comment.