Nov 17, 2020
Very interesting and fun read, but I think you missed one way to be VERY accurate, as long as you don't mind deleting your users' batteries, looool.
Inside of a web worker:
const t0 = performance.now();while (performance.now() - t0 < 250) { }// done
I'm actually morbidly curious how well this would perform in the different situations you measured, hahaha. I even made a silly little codepen for it