Created
September 10, 2012 19:13
-
-
Save j0x0j/3693084 to your computer and use it in GitHub Desktop.
JS interval ticker
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
var gameTimer = setInterval('timer()', 1000); | |
function timer() { | |
// se llama cada segundo | |
// podrias tener un var del num de segundos | |
// y cada ves que llama timer() lo incrementa ++ | |
} | |
// Cuando acabas, matas el interval | |
clearInterval(gameTimer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment