I’m working on Promodoro clock project.
So my code passed all tests ,but( ) sometimes somehow this one:
[When a countdown reaches zero (NOTE: timer MUST reach 00:00), a sound indicating that time is up should play. This should utilize an HTML5 audio tag and have a corresponding id=“beep”.
doesn’t, and i have no idea why!
here is the link:
I fixed the problem by replacing setInterval () inside componentDidMount() method with accurateInterval(), here is the link to the script : https://gist.github.com/Squeegy/1431195.
So there was drift in time when Session length/break length are long.