chromium/third_party/blink/web_tests/fast/harness/perftests/measure-time.html

<script src="../../../../../blink/perf_tests/resources/runner.js"></script>
<script>
// Suppress JavaScript trace event console messages.
console.time = function() {};
console.timeEnd = function() {};

// The initial value doesn't affect result.
var virtualTime = 123456;
PerfTestRunner.now = function () { return virtualTime; }

var originalSetTimeout = window.setTimeout;
window.setTimeout = function(f, t) {
  // This doesn't affect result.
  virtualTime += 654321;
  originalSetTimeout(f, t);
};

PerfTestRunner.measureTime({
  run: function () {
    virtualTime += 20;
  },
  warmUpCount: 3,
  doNotMeasureMemoryUsage: true,
});
</script>