[Twisted-Python] Timers in Twisted
glyph at twistedmatrix.com
Mon Jul 20 08:36:47 EDT 2009
On Mon, Jul 20, 2009 at 8:26 AM, David Guerin <david at strotos.com> wrote:
> Hey all,
> I'm pretty new to Twisted Framework but things are going along nicely.
> At the moment I am trying to get a timer to fire off say every 5
> What's the best way to do this with twisted?
> I found an old link to a how to with timers in twisted on the
> twistedmatrix.com site but there wasn't a web page there when I clicked
You can use LoopingCall: <
from twisted.internet.task import LoopingCall
MINUTES = 60.0
repeater = LoopingCall(myTimer)
repeater.start(5 * MINUTES)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python