Recurring Timer

sik0fewl xxdigitalhellxx at hotmail.com
Fri Mar 28 15:37:30 CET 2003


Boethius wrote:
> Hi,
> 
> I checked out the Threading.Timer and it executes _once_ after x
> seconds. I need something similar: a Timer that executes every x
> seconds until explicitely stoped.
> 
> How can I do this? O:-)
> 
> TIA

Have your function that does your required tasks every x seconds call 
the timer again, ie:

def myfunc():
	.. do normal function stuff ..
	if (cond): return
	call timer function

myfunc()

-- 
Hope this helps,
Ryan





More information about the Python-list mailing list