aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblastmaster <blastmaster@tuxcode.org>2014-12-12 11:29:51 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2014-12-28 18:45:30 (GMT)
commit44dd0a60cfd5da71f1c0dacb2e008d566db0f14c (patch)
tree803b8a95f2577cdd667ebb6c17514b90cdc6f6aa
parent5869a54b201cd30988618025e63ceaa4df69d927 (diff)
downloadvicious-legacy-44dd0a60cfd5da71f1c0dacb2e008d566db0f14c.tar.xz
new gears.timer
timer implementation move from c to lua. Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index c154e20..c20c418 100644
--- a/init.lua
+++ b/init.lua
@@ -10,7 +10,7 @@
local type = type
local pairs = pairs
local tonumber = tonumber
-local capi = { timer = timer }
+local timer = (type(timer) == 'table' and timer or require("gears.timer"))
local os = { time = os.time }
local table = {
insert = table.insert,
@@ -117,7 +117,7 @@ local function regregister(reg)
-- Start the timer
if reg.timer > 0 then
local tm = timers[reg.timer] and timers[reg.timer].timer
- tm = tm or capi.timer({ timeout = reg.timer })
+ tm = tm or timer({ timeout = reg.timer })
if tm.connect_signal then
tm:connect_signal("timeout", reg.update)
else