Skip to content

Instantly share code, notes, and snippets.

@gerrard00
Created February 21, 2019 19:05
Show Gist options
  • Save gerrard00/3a144a35e1dd618d9edd67204c5fecc6 to your computer and use it in GitHub Desktop.
Save gerrard00/3a144a35e1dd618d9edd67204c5fecc6 to your computer and use it in GitHub Desktop.
Stupid sleep function for node js
const sleep = (ms) =>
new Promise(resolve =>
setTimeout(() => resolve(), ms));
@gerrard00
Copy link
Author

A function to create test code that needs artificial delays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment