Skip to content

Instantly share code, notes, and snippets.

@rupakg
Created June 30, 2018 06:28
Show Gist options
  • Select an option

  • Save rupakg/5c3d2e94cb9396f694a56262e4611cb0 to your computer and use it in GitHub Desktop.

Select an option

Save rupakg/5c3d2e94cb9396f694a56262e4611cb0 to your computer and use it in GitHub Desktop.

Revisions

  1. rupakg created this gist Jun 30, 2018.
    5 changes: 5 additions & 0 deletions await_delay.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    // define
    const delay = ms => new Promise(res => setTimeout(res, ms))

    // call
    await delay(5000)