We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94cd9f8 commit c2a5fb0Copy full SHA for c2a5fb0
days/01-03-datetimes/Pomodoro/pomodoro_simple.py
@@ -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