MCPcopy Index your code
hub / github.com/darkreader/darkreader / _measureTime

Method _measureTime

tasks/task.js:29–34  ·  view source on GitHub ↗

* @param {() => void | Promise } fn

(fn)

Source from the content-addressed store, hash-verified

27 * @param {() => void | Promise<void>} fn
28 */
29 async _measureTime(fn) {
30 const start = Date.now();
31 await fn();
32 const end = Date.now();
33 log(`${this.name} (${(end - start).toFixed(0)}ms)`);
34 }
35
36 /**
37 * @param {TaskOptions} options

Callers 2

runMethod · 0.95
watchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected