Skip to content

2621. Sleep 👍

1
2
3
4
5
async function sleep(millis: number): Promise<void> {
  return new Promise((resolve) => {
    setTimeout(resolve, millis);
  });
}