注意:有定时器,就不需要导入Thred 和 time
# Timer,格式 Timer(时间, 函数名, args=()) from threading import Timer def test(n): print(n+1) Timer(2, test, args=(1, )).start()
注意:有定时器,就不需要导入Thred 和 time
# Timer,格式 Timer(时间, 函数名, args=()) from threading import Timer def test(n): print(n+1) Timer(2, test, args=(1, )).start()
转载于:https://www.cnblogs.com/wt7018/p/11069321.html