diff --git a/pomodoroprompt.py b/pomodoroprompt.py index 482b45b..e08eda0 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -94,13 +94,15 @@ def main(): time.sleep(1) continue except KeyboardInterrupt: - time_spent = str_minutes(datetime.now(pytz.utc) - start) - print('\n{} time spent, save?'.format(time_spent)) - choice = input('[y]/n: ').strip() - if choice.lower() in ('y', 'yes', ''): - whatdid = pomodoro_prompt_report(whatnext) - record_task(whatdid, start) - log_step('Incomplete (' + time_spent + ') pomodoro: ' + whatdid, start, True) + time_spent = datetime.now(pytz.utc) - start + if time_spent > timedelta(minutes=INTERRUPTED_MIN): + time_spent_str = str_minutes(time_spent) + print('\n{} time spent, save?'.format(time_spent_str)) + choice = input('[y]/n: ').strip() + if choice.lower() in ('y', 'yes', ''): + whatdid = pomodoro_prompt_report(whatnext) + record_task(whatdid, start) + log_step('Incomplete (' + time_spent_str + ') pomodoro: ' + whatdid, start, True) quit_prompt() else: print('What did you break?')