* @param {() => void | Promise } fn
(fn)
| 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 |