# HG changeset patch # User Waqas Hussain # Date 1383170297 14400 # Node ID 11f14d44438e9d5c7517759776c35d33948b91a1 # Parent 95f1d5421fbcfba72bb36a8fd1c2269f83a82279 util.timer: Import all require upvalues. diff -r 95f1d5421fbc -r 11f14d44438e util/timer.lua --- 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