setTimeout(), setInterval(), and requestAnimationFrame()
Why might the logged time be significantly more than 100ms?
const start = performance.now();
setTimeout(() => {
const elapsed = performance.now() - start;
console.log(elapsed);
}, 100);
const start = performance.now();
setTimeout(() => {
const elapsed = performance.now() - start;
console.log(elapsed);
}, 100);