2025-03-05 12:19:35 -07:00

4 lines
172 B
JavaScript

export const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
export const randomBool = (chance_of_failure = 0.25) => Math.random() < chance_of_failure;