aboutsummaryrefslogtreecommitdiffstats
path: root/util/timer.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-10-30 17:58:17 -0400
committerWaqas Hussain <waqas20@gmail.com>2013-10-30 17:58:17 -0400
commit33de95fb8a9a209c1645035fb4488c0e7cbc3f1e (patch)
tree0d960576ee1f8b784698e1e29cc294f0abfe878a /util/timer.lua
parentc782ef5a75dea9e56a5b890df5306089260a1dcb (diff)
downloadprosody-33de95fb8a9a209c1645035fb4488c0e7cbc3f1e.tar.gz
prosody-33de95fb8a9a209c1645035fb4488c0e7cbc3f1e.zip
util.timer: Import all require upvalues.
Diffstat (limited to 'util/timer.lua')
-rw-r--r--util/timer.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/timer.lua b/util/timer.lua
index 76deaff1..451e27d3 100644
--- a/util/timer.lua
+++ b/util/timer.lua
@@ -15,6 +15,9 @@ local get_time = require "socket".gettime;
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 params = {};
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