[Twisted-Python] How to use time-base event in reactor?

Christopher Armstrong radix at twistedmatrix.com
Sun Mar 7 23:46:10 MST 2010


On Sun, Mar 7, 2010 at 11:36 PM, sleepd <sleeepd at gmail.com> wrote:
> I am developing a online RTS game server, some event a base by time,
> example: a buff grant Max HP for 30 seconds, spawn army ever 30 seconds...
> I plan to use a timer to manage it, but Twisted areĀ event-driven, how to put
> this timer in reactor's loop?

See:

reactor.callLater

twisted.internet.task.LoopingCall



-- 
Christopher Armstrong
http://radix.twistedmatrix.com/
http://planet-if.com/




More information about the Twisted-Python mailing list