- Joined
- Jan 16, 2008
- Messages
- 1,244
I heard some people saying that PolledWait is imprecise. Since i do not know timers and don't have enough time to study them now, i was wondering if you can answer this. Is it more imprecise if you use multiple but shorter waits or just one big wait?
My guess is that using multiple waits creates more imprecision but i thought it would be best if i check.
JASS:
function example_1 takes real duration returns nothing
local real d = duration/100
local integer loopcount = 0
loop
set loopcount = loopcount + 1
exitwhen loopcount = 100
call PolledWait(d)
endloop
endfunction
function example_2 takes real duration returns nothing
call PolledWait(duration)
endfunction