A downloadable extension

Download NowName your own price

Try the following:

var t = get_timer();
repeat (1000) sqrt(2);
show_debug_message(get_timer() - t);

On HTML5, this would print 0, because get_timer is using (new Date).getTime()*1000, thus having millisecond accuracy at most, and a few other gotchas.

But, if you import this extension (which replaces the implementation with a higher-precision performance.now) and re-run the sample, you would see an actual timestamp diff, like 304999.9 (note that modern browsers will clamp timestamp precision to mitigate fingerprinting/side-channel attacks).

Download

Download NowName your own price

Click download now to get access to the following files:

js_hiprec_get_timer.gmez 1 kB

Leave a comment

Log in with itch.io to leave a comment.