An open-source, self-hosted replacement for wow.vision. Can be hosted by users or bot creators. Users should utilize the Client branch for whichever unlocker they are using. If you are hosting an OpenVision server, utilize the Server branch.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenVision/Vision/TimeManager/TimeManager.lua

27 lines
529 B

local Tinkr, Vision = ...
local Timer = Vision.Timer
local TimeManager = {
timers = {},
}
TimeManager.__index = TimeManager
-- Constructor
---@return TimeManager
function TimeManager:New()
local self = setmetatable({}, TimeManager)
self.timers = {}
return self
end
function TimeManager:GetTimer(label, start_events, reset_events)
if self.timers[label] == nil then
self.timers[label] = Timer:New(label, start_events, reset_events)
return self.timers[label]
end
end
return TimeManager