Skip to content

Instantly share code, notes, and snippets.

@KOBA789
Created February 22, 2017 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KOBA789/ee149d85ebe7807266b57a96df6c7714 to your computer and use it in GitHub Desktop.
Save KOBA789/ee149d85ebe7807266b57a96df6c7714 to your computer and use it in GitHub Desktop.
Node.js v7.6.0 記念
'use strict';
function wait (ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function mainLoop() {
while(true) {
console.log('tick!');
await wait(1000);
}
}
mainLoop();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment