Remove the line
seconds = 0.01
from your function. Every time this function is invoked, your variable seconds
keeps getting re-initialised to 0.01
, thus not letting it increase any further. You have already initialised it once at the time of declaration, so don’t need to do it again and again.
def job():
print("I'm working...")
global seconds
seconds += 0.01
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…