I've seen in several posts that Timer Tools is much better/faster than Timer Utils. Is that still true, or Timer Utils has been improved enough to keep up with Timer Tools?
Wietlol keeps suggesting people to use Timer Utils, so I'm wondering if it's the better choice nowdays.
And one more thing:
For PERSONAL use ONLY, can I use my own system?
If I'm not saving the same timer more than once, this should work just fine.
Wouldn't that be the fastest way to recycle timers?
Wietlol keeps suggesting people to use Timer Utils, so I'm wondering if it's the better choice nowdays.
And one more thing:
For PERSONAL use ONLY, can I use my own system?
JASS:
library TimerActions
globals
private integer count = 0
private timer array timers
private timer array timers2
private timer array timers3
endglobals
function RecTimer takes timer t returns nothing
if count <= 8190 then
set timers[count] = t
set count = count + 1
elseif count <= 16380 then
set timers2[count - 8191] = t
set count = count + 1
elseif count <= 24570 then
set timers3[count - 16381] = t
set count = count + 1
else
call DestroyTimer(t)
endif
endfunction
function GetFreeTimer takes nothing returns timer
if count > 16380 then
set count = count - 1
return timers3[count]
elseif count > 8190 then
set count = count - 1
return timers2[count]
elseif count > 0 then
set count = count - 1
return timers[count]
else
return CreateTimer()
endif
endfunction
function RecPeriodicTimer takes timer t returns nothing
call PauseTimer(t)
call RecTimer(t)
endfunction
function ClearTimer takes timer t, boolean b returns nothing
call FlushChildHashtable(udg_Table, GetHandleId(t))
if b then
call PauseTimer(t)
endif
call RecTimer(t)
endfunction
endlibrary
Wouldn't that be the fastest way to recycle timers?