http://caspervonb.github.io/2014/02/24/javascript-game-development-asynchronous-execution-loop.html requestanimationframe provides a hi-res time argument.