You're creating an anonymous function inside double brackets, but it isn't being called. You'd have to take the double brackets off. The way you're doing the timer is a bit strange, as local variables can't be called in the global space >.> This is the standard method: