I've been playing with AceTimer in my app and I saw some weird behavior where the very first timer trigger happens between 3 and 5 seconds too fast. I figured it was my code or AceTimer so I removed everything from my app's OnInitialize and OnEnable functions and then set my code to use CTimer.After directly (which is what AceTimer uses under the covers). So my app now has this:
Code:
local delay = 10
function CTimerFire()
print("[ " .. date("%X") .. " ] CTimerFired")
C_Timer.After(delay, CTimerFire)
end
function TestApp:OnEnable()
C_Timer.After(delay, CTimerFire)
local nextFire = time() + delay
print("[ " .. date("%X") .. " ] It should fire in " .. delay .. " seconds (" .. nextFire .. " aka " .. date("%X", nextFire ) .. ")")
end
And I'm still seeing the same thing. Not once has the first event triggered at the correct time. All subsequent events fire at the correct time, though. I've tried with delays as short as 1 second and as long as 120 seconds. I'm wondering if anyone else has seen this or might know what I'm doing wrong or misunderstanding about addons.
https://imgur.com/a/YQKdlmA