Question about how the timing works #153
Answered
by
Stigmatoz
ChandlerMcCook
asked this question in
Q&A
-
Hi, I'm making a similar web tracking app and I was wondering how the time tracking in the mainTracker function in tracker.ts keeps synced at running once a second? I see that it calls the tab.incSummaryTime() method but I'm not sure what keeps this code from running say several times a second or too few times a second. Thank you! -chandler |
Beta Was this translation helpful? Give feedback.
Answered by
Stigmatoz
Feb 20, 2025
Replies: 1 comment 1 reply
-
Hi Chandler, I run time check on websites every second in this service worker. And I use one instance for a repository that saves data to |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ChandlerMcCook
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Chandler,
I run time check on websites every second in this service worker. And I use one instance for a repository that saves data to
chrome.storage
every 5 seconds.https://github.com/Stigmatoz/web-activity-time-tracker/blob/e0e62465e9274d4dd34169e62d1acfba30f02114/src/tracker.ts#L29C1-L32C2