Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Timer resetting while watching movies or youtube #51

Closed
gusals3587 opened this issue Sep 16, 2018 · 1 comment
Closed

Timer resetting while watching movies or youtube #51

gusals3587 opened this issue Sep 16, 2018 · 1 comment

Comments

@gusals3587
Copy link

Bug

While watching long youtube videos or any kind of video, if there weren't any user activity for more than a couple of minutes, the timer reset to 0, defeating the purpose of tracking user's time with the computer

Speculation

Looking at the code, it appears that in the updateButton function, there appears to be a condition that if the user was not entering any keys, moving, clicking, or scrolling with the mouse for more than 120 seconds (or 2 minutes) the timer resets

Temporary Fix

Removing this

if (self.sinceUserActivity() > userIdleSeconds) {
    timerStart = Date()
    idle = true
} ...

does seems to stop the timer from resetting, however I do not know the implication that might be involved in removing that if block

Any suggestions on how to solve this?

@josh
Copy link
Owner

josh commented Sep 24, 2018

Checking for mouse movements is part of the current App design. I'll keep an eye out for APIs that could tell if you're computer is playing back video to keep the timer from reseting. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants