8 lines
161 B
TypeScript
8 lines
161 B
TypeScript
|
export async function sleep(timeout = 250): Promise<void> {
|
||
|
return new Promise((resolve) => {
|
||
|
setTimeout(() => {
|
||
|
resolve();
|
||
|
}, timeout);
|
||
|
});
|
||
|
}
|