Skip to content

Commit dc1e8cf

Browse files
authored
Merge pull request #23 from TheRedPanda17/car/add-leading-zero
2 parents 8b0aad2 + 0979488 commit dc1e8cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tomato.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def tomato(minutes, notify_msg):
5959
print('')
6060
break
6161

62-
countdown = '{}:{} ⏰'.format(int(left_seconds / 60), int(left_seconds % 60))
62+
seconds_slot = int(left_seconds % 60)
63+
seconds_str = str(seconds_slot) if seconds_slot >= 10 else '0{}'.format(seconds_slot)
64+
65+
countdown = '{}:{} ⏰'.format(int(left_seconds / 60), seconds_str)
6366
duration = min(minutes, 25)
6467
progressbar(diff_seconds, minutes * 60, duration, countdown)
6568
time.sleep(1)

0 commit comments

Comments
 (0)