react-stopwatch
react-stopwatch copied to clipboard
Relying on setInterval
From a metronome app I wrote, I don't think you can rely on setInterval for timing if you want it to be precise. Over time it will drift. Use can use something like performance.now() instead.
Agree. It is a Google Audit suggested method, described here: https://developers.google.com/web/tools/lighthouse/audits/date-now
yes, I agree too. I will take a look at this in the next version.