MCPcopy Index your code
hub / github.com/coderoad/coderoad-vscode / throttle

Function throttle

src/services/testRunner/throttle.ts:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4const THROTTLE_OFFSET = 300 // ms
5
6export const throttle = (): Date | null => {
7 const now = new Date()
8 if (+now > +lastRun + THROTTLE_OFFSET) {
9 lastRun = now
10 return lastRun
11 }
12 return null
13}
14
15// quick solution to prevent processing multiple results
16// NOTE: may be possible to kill child process early if we migrate to tasks

Callers 1

createTestRunnerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected