Skip to content

Task row timer clock drift (on hidden window / when the browser suspends animations?) #2489

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

Open
nekohayo opened this issue Apr 14, 2025 · 1 comment
Assignees
Labels

Comments

@nekohayo
Copy link

nekohayo commented Apr 14, 2025

I run app.invoicing.co in GNOME Web / Epiphany 47.4, as a web app, on Fedora 41.

However, I noticed that when I am inside a task (i.e. https://app.invoicing.co/#/tasks/some_hash/edit) and have the timer running, the timecodes drift compared to the system clock, even without suspending/resuming the computer; simply by me switching to another workspace or minimizing the window, so it's not the same as my previously reported issue #1744.

Demonstration video where you can see that the InvoiceNinja timer drifts / lags compared to a normal stopwatch (gnome-clocks) that measures the system time:

2025-04-13.-.clock.drift.in.task.timer.with.Epiphany.window.suspended.-.drifting.timer.at.the.bottom.in.the.row.mp4

As you can see here, my task timer indicates 03:08:00 when I focus out to another workspace, and when I come back exactly 60 seconds later, it indicates 03:08:33 (approximatively), and when I refresh the page a few moments later, it jumps from 03:08:42 to 03:09:27...

This was observed mainly on the bottom row timer. The big timer at the top does not seem to be affected, somehow (but maybe I didn't look properly).


Note that recent versions of WebKitGTK stop the animation clock (to save power) when the window is not visible, so I don't know if that might be related. If so, maybe part of solving this durably would be handling the visibility change events as suggested in #1871 (comment) to actually stop doing any CPU wakeups as long as the window is not visible, and resynchronize everything once it becomes visible again :)

@nekohayo nekohayo changed the title Task timer clock drift on focus out / when the browser suspends animations Task row timer clock drift (on hidden window / when the browser suspends animations?) Apr 14, 2025
@turbo124
Copy link
Member

@Civolilah can you please investigate, may need to refresh the timer when the window 'focus' event is hit so that the timer can update

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

No branches or pull requests

3 participants