blob: 72c0ff918315377c1b3c6a52349f14cd7758ec85 [file] [log] [blame]
<!DOCTYPE html>
<!-- Measures the delay between two successive short-delay timeouts.
Note that scheduler allows a small number of quick tasks to run without
throttling, so the delay is 20ms to avoid this.
-->
<script>
addEventListener('message', (e) => {
setTimeout(() => {
let start = performance.now();
setTimeout(() => {
let end = performance.now();
e.source.postMessage(end - start, e.origin);
}, 20);
}, 20);
});
</script>