Skip to content

Instantly share code, notes, and snippets.

@yentsun
Last active May 29, 2018 19:54
Show Gist options
  • Save yentsun/5d131d7858da6f79a9ca8ec17afae2b6 to your computer and use it in GitHub Desktop.
Save yentsun/5d131d7858da6f79a9ca8ec17afae2b6 to your computer and use it in GitHub Desktop.
ES6 Sleep
const sleep = require('util').promisify(setTimeout);
//...
await sleep(15);
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment