Skip to content

Commit

Permalink
Add Leading 0 To Seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRedPanda17 committed Sep 5, 2023
1 parent 8b0aad2 commit 0979488
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tomato.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ def tomato(minutes, notify_msg):
print('')
break

countdown = '{}:{} ⏰'.format(int(left_seconds / 60), int(left_seconds % 60))
seconds_slot = int(left_seconds % 60)
seconds_str = str(seconds_slot) if seconds_slot >= 10 else '0{}'.format(seconds_slot)

countdown = '{}:{} ⏰'.format(int(left_seconds / 60), seconds_str)
duration = min(minutes, 25)
progressbar(diff_seconds, minutes * 60, duration, countdown)
time.sleep(1)
Expand Down

0 comments on commit 0979488

Please sign in to comment.