MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / clear

Function clear

frontend/src/ts/test/test-timer.ts:125–137  ·  view source on GitHub ↗
(logEnd = false, now = performance.now())

Source from the content-addressed store, hash-verified

123}
124
125export function clear(logEnd = false, now = performance.now()): void {
126 stopped = true;
127 clearLowFpsMode();
128 newTimer.reset();
129 if (timer !== null) clearTimeout(timer);
130 if (logEnd) {
131 logTestEvent("timer", now, {
132 event: "end",
133 timer: Time.get(),
134 date: new Date().getTime(),
135 });
136 }
137}
138
139function premid(): void {
140 if (timerDebug) console.time("premid");

Callers

nothing calls this directly

Calls 4

clearLowFpsModeFunction · 0.90
logTestEventFunction · 0.90
resetMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected