Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Countdown to a specific time (e.g. 12:00) becomes invalid after pause #70

Open
JokeNeverSoke opened this issue Dec 16, 2020 · 0 comments

Comments

@JokeNeverSoke
Copy link
Contributor

JokeNeverSoke commented Dec 16, 2020

Issue

The stopwatch function is being used in two cases: for a time period (20s) or to a specific time (12:30). However, in both cases the target datetime object is extended when paused, as line 414

termdown/termdown.py

Lines 411 to 414 in 660b30f

if input_action == INPUT_PAUSE:
time_paused = datetime.now() - pause_start
sync_start += time_paused
target += time_paused

This may not be the intended behavior for the user.

Possible Solutions

  • Create an extra function (not recommended as code duplication)
  • Add an extra flag to not add the time delta when passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant