mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-20 16:05:18 +00:00
* Restore foundry onboarding stack * Consolidate foundry rename * Create foundry tasks without prompts * Rename Foundry handoffs to tasks
12 lines
369 B
TypeScript
12 lines
369 B
TypeScript
const MOCK_LATENCY_MIN_MS = 1;
|
|
const MOCK_LATENCY_MAX_MS = 200;
|
|
|
|
export function randomMockLatencyMs(): number {
|
|
return Math.floor(Math.random() * (MOCK_LATENCY_MAX_MS - MOCK_LATENCY_MIN_MS + 1)) + MOCK_LATENCY_MIN_MS;
|
|
}
|
|
|
|
export function injectMockLatency(): Promise<void> {
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, randomMockLatencyMs());
|
|
});
|
|
}
|