I'm creating an HTML5 web app meant for the iPad, but which can also be run in a PC browser. I'm using the javascript function setTimeout to synchronize some screen transitions with an audio file playing in the background.
Specifically, the code I'm using is:
setTimeout(showStartScreen, 30000);
setTimeout(showInstructionScreen, 60000);
On a PC the timing is perfect and the transition matches up with the audio fine. On an iPad 2, the transition is about a half second faster than on the PC. ON an iPad 3, the transition is even faster.
Is there a more reliable way to time something across different platforms?