Commit graph

25 commits

Author SHA1 Message Date
daurnimator
c84cd87f94 util/timer: Re-set params when timer is rescheduled 2013-11-06 12:56:18 -05:00
Waqas Hussain
33de95fb8a util.timer: Import all require upvalues. 2013-10-30 17:58:17 -04:00
Waqas Hussain
c782ef5a75 util.timer: Fix another variable name typo (thanks again zash). 2013-10-30 17:56:00 -04:00
Waqas Hussain
053117d38d util.timer: Fix variable name typo. 2013-10-30 17:51:37 -04:00
Waqas Hussain
495b904d72 util.timer: Updated to use util.indexedbheap to provide a more complete API. Timers can now be stopped or rescheduled. Callbacks are now pcall'd. Adding/removing timers from within timer callbacks works better. Optional parameter can be passed when creating timer which gets passed to callback, eliminating the need for closures in various timer uses. Timers are now much more lightweight. 2013-10-30 17:44:42 -04:00
Florian Zeitz
1d833bb807 Remove all trailing whitespace 2013-08-09 17:48:21 +02:00
Waqas Hussain
515d0ff00e util.timer: Always pass the current time to timer callbacks. 2012-05-12 21:46:54 +05:00
Matthew Wild
5e53b5f47c util.timer: Remove unnecessary require calls, fixes a traceback (thanks nulani) 2012-05-03 18:59:06 +01:00
Matthew Wild
ffa939698b net.server, net.timer, net.server_select: Rearrange dependencies between these three modules. server.addtimer() is no longer a public function (renamed to _addtimer) and is not available at all from server_event (compat code removed to prevent traceback) (thanks Nulani) 2012-05-03 16:48:34 +01:00
Matthew Wild
465460b13f util.timer: Remove unused function imports 2012-04-28 02:41:53 +01:00
Matthew Wild
70cb616c9c util.timer: Variable name change (func -> callback) 2011-11-03 12:47:52 +00:00
Matthew Wild
3f7fda7079 util.timer: Fix corner case of timer not repeating if it returns <= 0 2011-09-22 15:48:56 +01:00
Waqas Hussain
02b951a1a8 util.timer: Activate higher timer precision. 2010-12-02 22:41:26 +05:00
Matthew Wild
90116b3c35 util.timer: When using libevent hold onto the event handle to stop it being collected (and the timer stopping). Fixes BOSH ghosts, thanks Flo, niekie, waqas. 2010-04-07 21:00:20 +01:00
Matthew Wild
46c0b8c7f9 Merge 0.6->0.7 2010-03-22 17:24:55 +00:00
Matthew Wild
2bc0606453 Update copyright headers for 2010 2010-03-22 17:06:15 +00:00
Matthew Wild
d7d5b34c60 util.timer: Use luaevent's built-in method of repeating an event (fixes a weird crash) 2009-12-17 16:52:39 +00:00
Matthew Wild
723b03c6bf util.timer: Fix libevent timers (event.base doesn't exist...) 2009-11-21 03:16:14 +00:00
Matthew Wild
89fa12376a util.timer: Use libevent for lightweight timers if available and configured (use_libevent option) 2009-11-21 02:40:21 +00:00
Matthew Wild
59a69e124e util.timer: Pass current_time to timer callbacks 2009-10-03 02:33:33 +01:00
Matthew Wild
118883d655 Remove version number from copyright headers 2009-07-10 03:11:45 +01:00
Matthew Wild
c80f91dc02 0.3->0.4 2009-03-20 20:16:25 +00:00
Matthew Wild
0c8bb8e89f util.timer: More small fixes I forgot to commit 2009-02-26 22:17:55 +00:00
Matthew Wild
d2631d39ca util.timer: Fix crash when loaded but no tasks set, fix skipping some tasks when multiple set, and one removed 2009-02-26 21:00:42 +00:00
Waqas Hussain
97ea70c7d3 Added util/timer.lua - a timer API 2009-02-21 01:13:53 +05:00