[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Timed events
From:       Mongryong <Mongryong () sympatico ! ca>
Date:       2003-01-31 22:25:22
[Download RAW message or body]

> 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.


-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic