How Accurate is the Clock

At the moment, i’m using the Clock.ElapsedTime method to measure the amount of seconds to transform a block back and forward. Then resetting the clock. But after a 2-3 cycles it goes really out of phase. It this because of the accuracy of using a clock?

Is it specifically because the clock.start() method takes time to reload?


The clock uses with fallback to

Pretty much all browsers support so you can assume you’re using that. The accuracy depends on the browser, and is slightly reduced for security reasons. I think it’s accurate to about 1ms.

Unfortunately, there’s no way of getting more accurate timing than this in a browser.


It must be the way my functions are written then. Cheers