Skip to content

Instantly share code, notes, and snippets.

@omsharp
Created September 19, 2021 17:47
Show Gist options
  • Save omsharp/548656dd79ec662efc2f961330aec35b to your computer and use it in GitHub Desktop.
Save omsharp/548656dd79ec662efc2f961330aec35b to your computer and use it in GitHub Desktop.

Revisions

  1. omsharp created this gist Sep 19, 2021.
    8 changes: 8 additions & 0 deletions delay.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    function delay(delayInms) {
    return new Promise((resolve) => {
    setTimeout(() => {
    resolve(2);
    }, delayInms);
    });
    }
    await delay(500);