Software /
code /
prosody
Changeset
5880:11f14d44438e
util.timer: Import all require upvalues.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 30 Oct 2013 17:58:17 -0400 |
parents | 5879:95f1d5421fbc |
children | 5897:296e32a1ff33 |
files | util/timer.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/timer.lua Wed Oct 30 17:56:00 2013 -0400 +++ b/util/timer.lua Wed Oct 30 17:58:17 2013 -0400 @@ -15,6 +15,9 @@ local t_insert = table.insert; local pairs = pairs; local type = type; +local debug_traceback = debug.traceback; +local tostring = tostring; +local xpcall = xpcall; local data = {}; local new_data = {}; @@ -87,7 +90,7 @@ local next_time = nil; local _id, _callback, _now, _param; local function _call() return _callback(_now, _id, _param); end -local function _traceback_handler(err) log("error", "Traceback[timer]: %s", traceback(tostring(err), 2)); end +local function _traceback_handler(err) log("error", "Traceback[timer]: %s", debug_traceback(tostring(err), 2)); end local function _on_timer(now) local peek; while true do