Skip to content

Instantly share code, notes, and snippets.

@tisba
Created May 15, 2012 11:03
Show Gist options
  • Save tisba/2700854 to your computer and use it in GitHub Desktop.
Save tisba/2700854 to your computer and use it in GitHub Desktop.
var interval = 1000 / parseInt(process.argv[2], 10);
var counter = 0;
setInterval(function() {
counter++;
}, interval);
setInterval(function() {
console.log(counter);
counter = 0;
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment