aboutsummaryrefslogtreecommitdiff
path: root/uptime.lua
diff options
context:
space:
mode:
Diffstat (limited to 'uptime.lua')
-rw-r--r--uptime.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/uptime.lua b/uptime.lua
index eae1d35..82cb20a 100644
--- a/uptime.lua
+++ b/uptime.lua
@@ -6,6 +6,7 @@
-- {{{ Grab environment
local tonumber = tonumber
local io = { open = io.open }
+local setmetatable = setmetatable
local math = { floor = math.floor }
local helpers = require("vicious.helpers")
-- }}}
@@ -49,3 +50,5 @@ function worker(format, padding)
return {total_uptime, uptime_days, uptime_hours, uptime_minutes, uptime_seconds}
end
-- }}}
+
+setmetatable(_M, { __call = function(_, ...) return worker(...) end })