Timed events
Mongryong
Mongryong at sympatico.ca
Fri Jan 31 17:25:22 EST 2003
> Sam Marrocco wrote:
>
> > I'm trying to Python a script that will perform a function every few
> > seconds. Is there a particularly efficient way to do this that won't hog
> > processor time?
>
If you're looking for a multithreaded solution, than what you need is a
periodic timer! Take a look the Timer class from threadings.py. It
should be easier to modify it so that the timer is periodic. Take a look
at Timer.run(). A few little changes and your set.
More information about the Python-list
mailing list