From a5b78e910344f4277c110941145e9412a03039ef Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Wed, 9 May 2012 22:35:12 +0200 Subject: Lua: Move Theme's "aggravate_evil" timer to C --- lib/core/util.lua | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'lib/core') diff --git a/lib/core/util.lua b/lib/core/util.lua index 048b0d0f..7729ac35 100644 --- a/lib/core/util.lua +++ b/lib/core/util.lua @@ -71,28 +71,6 @@ function msg_print(c, m) end end --- better timer add function -__timers_callback_max = 0 - -function new_timer(t) - assert(t.delay > 0, "no timer delay") - assert(t.enabled, "no timer enabled state") - assert(t.callback, "no timer callback") - - local timer - if type(t.callback) == "function" then - setglobal("__timers_callback_"..__timers_callback_max, t.callback) - timer = %new_timer("__timers_callback_"..__timers_callback_max, t.delay) - __timers_callback_max = __timers_callback_max + 1 - else - timer = %new_timer(t.callback, t.delay) - end - - timer.enabled = t.enabled - - return timer -end - -- displays a scrolling list function display_list(y, x, h, w, title, list, begin, sel, sel_color) -- cgit v1.2.3