Hi everyone,
What I'm doing is creating a GUI that updates an IP Address on a given timeframe. My question is if the interval changes, can I cancel the first timer, and reuse that variable to create a new instance of the timer?
Something like this:
Code:
sleep=60000*intUpdateInterval
t=threading.Timer(sleep, IPCheck)
t.start()
#If the interval changes, stop the timer, change sleep, and then start a new thread. This would be attached to an event on the text box.
t.cancel()
sleep = 60000*intUpdateInterval
t=threading.Timer(sleep, IPCheck)
t.start()
If this won't work, then how would I accomplish this task? I'm fairly new to Python programming, but I have done some programming in other languages.
Have a great day
Patrick.
Bookmarks