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

Break timer gets paused when MacBook goes to sleep #25

Open
navinthomas opened this issue May 10, 2022 · 3 comments
Open

Break timer gets paused when MacBook goes to sleep #25

navinthomas opened this issue May 10, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@navinthomas
Copy link

navinthomas commented May 10, 2022

Steps to Reproduce

Device: MacBook Pro (2021)

  1. Start timer.
    Optional: Reduce work interval timer to reach next step faster
  2. Wait for break to start
  3. Once the break timer starts, leave the system on idle without being connected to a power adaptor, and let the MacBook go to sleep automatically
    Note: Your MacBook's sleep timer must be less than the break timer so that the MacBook goes to sleep while the break timer is still active
  4. Come back after some duration that is way past the break timer duration

Observed Behaviour

Check the app's timer, and it will still be in break mode since the break timer got paused when the system when to sleep

Expected Behaviour

Break timer should not have been paused.

Note: A Similar issue does not happen when the work timer is running, since the MacBook does not go to sleep when the work timer is running.

Suggestions

  1. In my opinion, when the system wakes up, the app should not just resume the break timer from where it got paused when the system went to sleep. The app should check how much time had elapsed since the break originally started and see if the break timer is already over. If over, the app should stop the break timer immediately. A new work interval timer should be started if the Stop after break is disabled.
  2. Another option would be to prevent the system from going to sleep during the breaks, just like how the app works in work intervals. Not sure if this is a good idea and whether it would be a concern for power efficiency. Maybe play a beep sound (or a subtle tick sound) every 1 minute in the break interval to remind the user that the system is still running? If playing the sound keeps the system awake, then it can serve two purposes -- keeping the system awake and reminding the user as well.
@ivoronin
Copy link
Owner

Try the latest release!

@navinthomas
Copy link
Author

Tested the new v3.4.0 release. Timer works with absolute time as expected. Thanks.

@navinthomas
Copy link
Author

Would it be possible to have the timer use non-absolute time in a work session, and absolute time in a break session? Or would that be too inconsistent behaviour? I'm trying to figure out if that would be better than the current new behaviour.

Work session with non-absolute time
The user can close the MacBook lid (putting the device to sleep), for whatever reason, and the timer would pause at that point. The work session automatically resumes from the paused point when the user opens the MacBook and starts working again.

Example scenario: The user has to leave immediately in between a work session due to an emergency. So the user just closed the MacBook, and then comes back later. Work timer resumes from where it paused (due to sleep) and user continues the work session for the remaining time. Ideally, the user should start a new timer if they wish to follow Pomodoro technique properly, but having a choice in that matter would be great for end users.

Break session with absolute time
The user leaves the MacBook idle at the desk when break starts - to drink water and walk around, i.e. typical break activities that do not involve sitting at the desk with the MacBook. After two minutes (default) the MacBook automatically goes to sleep.

  • User comes back at 4:30 mark, just before the break ends. The user sees that 30 seconds are left on the timer because break timer uses absolute time
  • OR - If the user comes back later than the 5-min mark, the break is already over. The timer is automatically stopped (in current release). The user can manually start the work timer again, or maybe the app can automatically start the next work timer if Stop after break is disabled. I think the later part is not implemented as of now. Maybe I can create a new issue for that?

I think the key point is that a user's work time should be conserved, but not their break time. That's why it might be better to pause the timer when the MacBook goes to sleep during a work session, and not pause the timer when the MacBook goes to sleep during a break session.

Let me know what you feel about this.

@ivoronin ivoronin added the enhancement New feature or request label May 10, 2022
@ivoronin ivoronin reopened this May 10, 2022
@ivoronin ivoronin added this to the v3.5 milestone May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants