Skip to content

Instantly share code, notes, and snippets.

@heapwolf heapwolf/9.js
Created Jul 19, 2012

What would you like to do?
var cycle = true;
var counter = 0;
function firstCallback() {
while(cycle) {
counter ++;
setTimeout(firstCallback, 100);
function secondCallback() {
cycle = false;
setTimeout(secondCallback, 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.