update gears.timer
This commit is contained in:
parent
78f4b56394
commit
48e51b4dd6
4
init.lua
4
init.lua
|
@ -10,7 +10,7 @@
|
||||||
local type = type
|
local type = type
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local tonumber = tonumber
|
local tonumber = tonumber
|
||||||
local capi = { timer = timer }
|
local timer = require("gears.timer")
|
||||||
local os = { time = os.time }
|
local os = { time = os.time }
|
||||||
local table = {
|
local table = {
|
||||||
insert = table.insert,
|
insert = table.insert,
|
||||||
|
@ -116,7 +116,7 @@ local function regregister(reg)
|
||||||
-- Start the timer
|
-- Start the timer
|
||||||
if reg.timer > 0 then
|
if reg.timer > 0 then
|
||||||
local tm = timers[reg.timer] and timers[reg.timer].timer
|
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
|
if tm.connect_signal then
|
||||||
tm:connect_signal("timeout", reg.update)
|
tm:connect_signal("timeout", reg.update)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue