MCPcopy Create free account
hub / github.com/avoidwork/tenso / mockDelay

Function mockDelay

benchmarks/auth.js:335–343  ·  view source on GitHub ↗
(fn, delay)

Source from the content-addressed store, hash-verified

333
334 // Mock delay function (without actual setTimeout for benchmarking)
335 const mockDelay = (fn, delay) => {
336 if (delay === 0) {
337 fn();
338 } else {
339 // In benchmark, we just simulate the delay logic without waiting
340 const randomDelay = Math.floor(Math.random() * delay) + 1; // eslint-disable-line no-unused-vars
341 fn(); // Execute immediately for benchmarking
342 }
343 };
344
345 const authFunction = () => {
346 // Mock authentication logic

Callers 1

benchmarkAuthDelayFunction · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected