Skip to content

Commit c2a5fb0

Browse files
committed
Pomodoro simple
1 parent 94cd9f8 commit c2a5fb0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from datetime import datetime, date, timedelta
2+
import time
3+
4+
DURATION = 1
5+
stop_at = timedelta(minutes=DURATION)
6+
now = datetime.now()
7+
stop = now + stop_at
8+
print (f'Started Pomodoro for {DURATION} mins')
9+
while 1:
10+
current = datetime.now()
11+
print (current)
12+
if current >= stop:
13+
print('Pomodoro timer done!')
14+
exit(0)
15+
time.sleep(1)

0 commit comments

Comments
 (0)