Created
February 22, 2017 02:37
-
-
Save KOBA789/ee149d85ebe7807266b57a96df6c7714 to your computer and use it in GitHub Desktop.
Node.js v7.6.0 記念
This file contains 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
'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