
local _, ZLAUTO = ...
local ZL = ZLAUTO.mainFrame
local MyAddon = ZL.MyAddon
---@class MeetingHornTimer
local Timer = ZLAUTO.MyAddon:NewClass('Timer')
MyAddon.Timer = Timer
function Timer:Constructor(callback)
    self._callback = callback
end

function Timer:Start(interval)
    self._interval = interval
    if self._timer then
        self._timer:Cancel()
    end
    self._timer = C_Timer.NewTicker(interval, self._callback)
end

function Timer:Stop()
    if self._timer then
        self._timer:Cancel()
        self._timer = nil
    end
end
