- This function is implemented by FrameXML in
Creates a new timer and returns its handle.
local timer = C_Timer.NewTimer(duration, callback)
- Number - Seconds before the timer completes
- Function - What you want to execute when the timer's duration has elapsed
- Table - A handle for a timer which has an attached function (:Cancel()) and the following default properties - _callback and _cancelled
Creates and starts a cancellable timer that calls callback after duration seconds.
Note that C_Timer.NewTimer and C_Timer.NewTicker are significantly more expensive than C_Timer.After and should be only used if you actually need any of their additional functionality.
While timers are currently just tickers with an iteration count of 1, this is likely to change in the future and shouldn't be relied on.
- Patch 6.0.2 (2014-10-14): Added.