Skip to content

Commit

Permalink
Merge pull request #23 from TheRedPanda17/car/add-leading-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
coolcode authored Feb 3, 2024
2 parents 8b0aad2 + 0979488 commit dc1e8cf
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 dc1e8cf

Please sign in to comment.