AceTimer

0 Downloads

Quick port over of AceTimer.

Not sure how upgrading versions would work in-game, but shouldn't be an issue with only 1 version available.

Requires LibStub.

Official API doc: http://www.wowace.com/addons/ace3/pages/api/ace-timer-3-0/

Relevant code

MyAddon = {}
LibStub("AceTimer-3.0"):Embed(MyAddon)

local id = MyAddon:ScheduleTimer(function() d("Non-Repeating") end, 10)  -- Ran once after 10 seconds
local id2 = MyAddon:ScheduleRepeatingTimer(function() d("Repeating") end, 5)  -- Ran every 5 seconds

MyAddon:CancelTimer(id2)
<<code lua>>

<</code>>