Created
January 16, 2020 02:45
-
-
Save vegerot/ddb6c8e19731c72877c509dacdc7d103 to your computer and use it in GitHub Desktop.
How do ticks work
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
#!/usr/bin/env node | |
// @flow | |
var start = Date.now(); | |
var timer = setTimeout(() => { | |
console.log('done'); | |
console.log(Date.now() - start); | |
}, 1); | |
var timer2 = setTimeout(() => { | |
console.log(timer); | |
console.log(Date.now() - start); | |
}, 0); | |
console.log(timer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment