i have a function thats gets executed when the script is run. this function is called main()
timer = 0
def main():
function2()
function3()
timer()
this function calls the following functions: function2, function3, and timer.
def timer():
global timer
while timer < 120:
timer += 1
timer.sleep(1)
print timer
if timer == 120:
timer = 0
function2 = false
the problem is that the timer doesn't print in the console. and function2 doesn't get disabled after 120 seconds.
what am i doing wrong? any help or suggestions would be appreciated!
timervariable seems ambiguous.timeris 1) an int, 2) a function, 3) misspelledtimemodule.