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

Time lost on every screenshot period #16

Open
kolorafa opened this issue Oct 15, 2021 · 2 comments
Open

Time lost on every screenshot period #16

kolorafa opened this issue Oct 15, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@kolorafa
Copy link

It's not huge, but user is losing 1s on every screenshot period (sometimes 2s).

So you work from 8:00 to 16:00, have a screenshot every 1min, and when you stop at 16:00 cattr would show on dashboard 7:52 work time.

@kolorafa
Copy link
Author

It might be that app is correct, but the dashboard that group the tasks is wrong:

We are fetching the /api/time-intervals/dashboard
and comparing "duration" to time difference from start to stop for the coutned group

The screenshot period is 2minutes, and the code is running in loop with sleep 60;

[2021-10-15 12:53:27] local.INFO: Duration difference for entry id 1180: 16s  
[2021-10-15 12:55:37] local.INFO: Duration difference for entry id 1180: 17s  
[2021-10-15 12:57:48] local.INFO: Duration difference for entry id 1180: 18s  
[2021-10-15 12:58:53] local.INFO: Duration difference for entry id 1180: 19s  
[2021-10-15 13:00:57] local.INFO: Duration difference for entry id 1180: 20s  
[2021-10-15 13:03:40] local.INFO: Duration difference for entry id 1180: 21s  
[2021-10-15 13:05:50] local.INFO: Duration difference for entry id 1180: 22s  
[2021-10-15 13:06:57] local.INFO: Duration difference for entry id 1180: 23s  
[2021-10-15 13:09:07] local.INFO: Duration difference for entry id 1180: 24s  
[2021-10-15 13:11:16] local.INFO: Duration difference for entry id 1180: 25s  
[2021-10-15 13:13:27] local.INFO: Duration difference for entry id 1180: 26s  
[2021-10-15 13:15:36] local.INFO: Duration difference for entry id 1180: 27s  
[2021-10-15 13:17:44] local.INFO: Duration difference for entry id 1180: 28s  
[2021-10-15 13:19:55] local.INFO: Duration difference for entry id 1180: 29s  
[2021-10-15 13:21:00] local.INFO: Duration difference for entry id 1180: 30s  
[2021-10-15 13:23:11] local.INFO: Duration difference for entry id 1180: 31s  
[2021-10-15 13:25:21] local.INFO: Duration difference for entry id 1180: 32s  
[2021-10-15 13:27:32] local.INFO: Duration difference for entry id 1180: 33s  
[2021-10-15 13:29:44] local.INFO: Duration difference for entry id 1180: 34s  
[2021-10-15 13:31:55] local.INFO: Duration difference for entry id 1180: 35s  
[2021-10-15 13:33:01] local.INFO: Duration difference for entry id 1180: 36s  
[2021-10-15 13:35:13] local.INFO: Duration difference for entry id 1180: 37s  
[2021-10-15 13:37:25] local.INFO: Duration difference for entry id 1180: 38s  
[2021-10-15 13:39:37] local.INFO: Duration difference for entry id 1180: 39s  
[2021-10-15 13:41:49] local.INFO: Duration difference for entry id 1180: 40s  
[2021-10-15 13:43:06] local.INFO: Duration difference for entry id 1180: 41s  

@vermorag
Copy link
Member

Mostly, it looks like the app issue. As I understand desktop app - it logics looks like that:

  1. Finish counting of the current interval
  2. Try to send it to server and wait for an answer
  3. If server don't answer - backup interval
  4. Start recording of the new interval

And since 2 and 3 point waits for server answer it can take up to 2-3 seconds, that causes your issue. I'll try to have a deeper look in code from that side.

@vermorag vermorag self-assigned this May 25, 2022
@vermorag vermorag added the bug Something isn't working label May 25, 2022
@vermorag vermorag removed their assignment Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants