Software /
code /
prosody
Comparison
util/timer.lua @ 5898:bf9aba718c01
util/timer: Re-set params when timer is rescheduled
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Wed, 06 Nov 2013 12:56:18 -0500 |
parent | 5880:11f14d44438e |
child | 6481:dbc72cd1332e |
comparison
equal
deleted
inserted
replaced
5897:296e32a1ff33 | 5898:bf9aba718c01 |
---|---|
103 params[_id] = nil; | 103 params[_id] = nil; |
104 --item(now, id, _param); -- FIXME pcall | 104 --item(now, id, _param); -- FIXME pcall |
105 local success, err = xpcall(_call, _traceback_handler); | 105 local success, err = xpcall(_call, _traceback_handler); |
106 if success and type(err) == "number" then | 106 if success and type(err) == "number" then |
107 h:insert(_callback, err + now, _id); -- re-add | 107 h:insert(_callback, err + now, _id); -- re-add |
108 params[_id] = _param; | |
108 end | 109 end |
109 end | 110 end |
110 next_time = peek; | 111 next_time = peek; |
111 if peek ~= nil then | 112 if peek ~= nil then |
112 return peek - now; | 113 return peek - now; |