From ce5146b70bb7e879ee127ffbb0f9bc648becadc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 6 Jul 2020 09:28:57 -0400 Subject: [PATCH] Add a break following a completed pomodoro --- pomodoroprompt.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pomodoroprompt.py b/pomodoroprompt.py index b2a47b0..482b45b 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -87,6 +87,11 @@ def main(): whatdid = pomodoro_prompt_report(whatnext) record_task(whatdid, start) log_step('Completed pomodoro: ' + whatdid, start, True) + end = datetime.now(pytz.utc) + timedelta(minutes=SHORT_MIN) + while datetime.now(pytz.utc) <= end: + to_go = end-datetime.now(pytz.utc) + print('\r', str_minutes(to_go), sep='', end='') + time.sleep(1) continue except KeyboardInterrupt: time_spent = str_minutes(datetime.now(pytz.utc) - start)