I built a metronome using JS and it's unreliable

Associate
Joined
15 Feb 2006
Posts
1,872
Location
hell
Hi guys

I just spent the last day or so building this

www.sharemyriffs.com/metronome and although it seems to work fine on desktop, as soon as I try it on mobile or tablet it really struggles. Basically it doesn't keep time or even increase speed properly.

I'm using two setTimeout functions and from what I hear it's a fairly unreliable way of doing things. I'm assuming that's why most people make metronomes using Flash.

Does anyone have any tips on how to improve the performance of things like this that use multiple setTimeouts?

Also, if you open another tab in chrome with the metronome on it slows right down.

Cheers
 
Back
Top Bottom