Created
January 14, 2015 17:26
-
-
Save postazure/6877cf940b3c2c7270e1 to your computer and use it in GitHub Desktop.
Repeating Pop-up | sleep();
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
function sleep(milliseconds){ | |
var start = new Date().getTime(); | |
for (var i = 0; i < 1e7; i++){ | |
if ((new Date().getTime() - start) > milliseconds){ | |
break; | |
}; | |
}; | |
}; | |
while (true){ | |
running = confirm("woof"); | |
if (running === false){ | |
break; | |
}; | |
sleep(3000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment