Thursday, March 8, 2018

ghetto hack to make a command-prompt-run Node process in Windows 7 just hang out for five seconds in the name of testing a race condition

setTimeout did not want to work for me for some reason so...

console.log('timer is starting');
var counter = 0;
while (counter < 100000) {
   console.log(counter);
   counter++;
}
console.log('five seconds have passed');

No comments:

Post a Comment