Created
February 21, 2019 19:05
-
-
Save gerrard00/3a144a35e1dd618d9edd67204c5fecc6 to your computer and use it in GitHub Desktop.
Stupid sleep function for node js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sleep = (ms) => | |
new Promise(resolve => | |
setTimeout(() => resolve(), ms)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A function to create test code that needs artificial delays.