opentibia / server

An open source server for the MMORPG Tibia.
GNU General Public License v2.0
416 stars 149 forks source link

OnTimerEvent #4

Open hampusborgos opened 12 years ago

hampusborgos commented 12 years ago

An OnTimerEvent should be implemented that allows you to schedule timers, both repeating and non-repeating.

Proposed solution: Add a new queue to ScriptManager with <microtime, Listener_ptr>, check this at the same time as timer event and dispatch any that have run out. Register function should be registerTimerEvent(1000, handler [, repeating]).