Cross-browser, high resolution timer function (replacement for Date().getTime()).


/ Published in: JavaScript
Save to your folder(s)

A cross-browser Javascript shim function to return the number of milliseconds elapsed since either the browser navigationStart event (using performance.now or browser equivalent) or the UNIX epoch, depending on availability.
Use it to get more accurate performance timings when optimizing your code.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.