MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / timeEnd

Function timeEnd

src/lib/console.js:173–184  ·  view source on GitHub ↗
(label = "default")

Source from the content-addressed store, hash-verified

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") {

Callers

nothing calls this directly

Calls 2

getStackFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected