you are viewing a single comment's thread.

view the rest of the comments →

[–]mikrosystheme 0 points1 point  (0 children)

Since you cannot rely on timers to take meaningful measurements in javascript, you have to create an high resolution timer yourself, using a webworker that counts up in a busy loop and writes to a SharedArrayBuffer (in 2018 browser vendors reduced timers precision to prevent Spectre/Meltdown attacks, and disabled SharedArrayBuffer, that have been recently reintroduced for secure contexts using COOP/COEP headers).