Skip to content

Instantly share code, notes, and snippets.

@Fire-
Created April 8, 2015 01:52
Show Gist options
  • Save Fire-/68ba172be6eb0a9a1371 to your computer and use it in GitHub Desktop.
Save Fire-/68ba172be6eb0a9a1371 to your computer and use it in GitHub Desktop.
js ticker
var ticker = setTimeout(function tick() {
clearTimeout(ticker);
console.log('tick');
ticker = setTimeout(tick, 1000);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment