Skip to content

Instantly share code, notes, and snippets.

const sleep = (secs: number) => new Promise<NodeJS.Timeout>(success => {
const timeOutId = setTimeout(() => {
success(timeOutId);
}, secs * 1000);
});
export { sleep };