| 171 | timers[label] = new Date().getTime(); |
| 172 | }, |
| 173 | timeEnd(label = "default") { |
| 174 | originalConsole.timeEnd(label); |
| 175 | if (typeof label !== "string") { |
| 176 | throw new TypeError("label must be a string"); |
| 177 | } |
| 178 | if (!timers[label]) { |
| 179 | throw new Error(`No such label: ${label}`); |
| 180 | } |
| 181 | const time = new Date().getTime() - timers[label]; |
| 182 | log("log", getStack(new Error()), `${label}: ${time}ms`); |
| 183 | delete timers[label]; |
| 184 | }, |
| 185 | timeLog(label = "default") { |
| 186 | originalConsole.timeLog(label); |
| 187 | if (typeof label !== "string") { |