Events
Robb Shecter
rs at onsitetech.com
Tue Dec 17 18:05:43 EST 2002
Anand B Pillai wrote:
>
> def func_that_does_something_special():
> # loooooooooong calculation...
>
> def mytimer(interval, num=1):
>
> count = 0
> while count < num:
> count += 1
> t = Timer(interval, func_that_does_something_special)
> t.start()
>
>
> The optional argument num can be used to perform the operation
> a stipulated number of times etc...
You'd need to either do a join() after the start(), or multiply the
interval by count, wouldn't you?
Robb
More information about the Python-list
mailing list