mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-05 18:01:39 +00:00
9 lines
313 B
TypeScript
9 lines
313 B
TypeScript
import { resolveTimerTimeoutMs } from "../shared/number-coercion.js";
|
|
|
|
/** Promise-based sleep that clamps timer inputs through the shared timeout resolver. */
|
|
export function sleep(ms: number): Promise<void> {
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, resolveTimerTimeoutMs(ms, 0, 0));
|
|
});
|
|
}
|