WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/libs/AceTimer-3.0
    from Rev 126 to Rev 145
    Reverse comparison

Rev 126 → Rev 145

AceTimer-3.0.lua
15,7 → 15,7
-- make into AceTimer.
-- @class file
-- @name AceTimer-3.0
-- @release $Id: AceTimer-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
-- @release $Id: AceTimer-3.0.lua 1037 2011-09-02 16:24:08Z mikk $
 
--[[
Basic assumptions:
36,7 → 36,7
- ALLOWS unscheduling ANY timer (including the current running one) at any time, including during OnUpdate processing
]]
 
local MAJOR, MINOR = "AceTimer-3.0", 5
local MAJOR, MINOR = "AceTimer-3.0", 6
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceTimer then return end -- No upgrade needed
402,7 → 402,7
 
-- Time to clean it out?
local list = selfs[self]
if (list.__ops or 0) < 250 then -- 250 slosh indices = ~10KB wasted (max!). For one 'self'.
if (list.__ops or 0) < 250 then -- 250 slosh indices = ~10KB wasted (worst case!). For one 'self'.
return
end
 
411,7 → 411,9
local n=0
for k,v in pairs(list) do
newlist[k] = v
n=n+1
if type(v)=="table" and v.callback then -- if the timer is actually live: count it
n=n+1
end
end
newlist.__ops = 0 -- Reset operation count
 
468,6 → 470,6
AceTimer.frame:SetScript("OnEvent", OnEvent)
AceTimer.frame:RegisterEvent("PLAYER_REGEN_ENABLED")
 
-- In theory, we should hide&show the frame based on there being timers or not.
-- In theory, we could hide&show the frame based on there being timers or not.
-- However, this job is fairly expensive, and the chance that there will
-- actually be zero timers running is diminuitive to say the lest.
-- actually be zero timers running is diminuitive to say the least.