UnMiBut if you want something like circa 20 seconds, you can always do TriggerSleepActions...
That's exactly the time I would not use them. I experimented with a friend, and using X2's we were able to totally mess up many maps. For example, the FM map Legacies: Tides of the Serpent has trading unlocked instantly rather than in 10 minutes, because of TriggerSleepAction(). That means it's firing about 600x sooner than it should.
SWAT: Aftermath also had that problem until the creator replaced TriggerSleepAction() with code equivalent to PolledWait(). Radiation would soar about 10 per second, rather than 1 per minute. That's another case where it's exactly 600x faster than it should be.
Then there's maps like Card Shuffle, which randomly malfunction, but nobody knows why.
And crappily coded/balanced TDs seem to randomly have time between rounds shorten or lengthen if they don't use timers, depending on who joins those games.
However, that doesn't mean that that's the only direction it can go. I've played with someone that has a 550mhz, and he actually forced TriggerSleepAction the other way. TriggerSleepAction(1.00) could fire in 2.5 seconds or more.
TriggerSleepAction should never be trusted to keep accurate time. Only use it where you don't care if it fires too soon or too late, or you know everyone playing is going to have relatively decent non-dualcore computers.
Uh, you actually said the same as I did, or did I use the wrong english words?*looking up* The difference is, that the longer the TriggerSleepAction is, the bigger could be the delay. In this case, something like TriggerSleepAction(20) won't be bothersome, because I don't think you care wether it's actually 20 seconds or 30, aka. circa 20 seconds... I don't believe it can be scretched up to 1 minute, but I'm not sure.(If yes, screw the TriggerSleepActions) So a TriggerSleepAction of 10 minutes is another story, there you have to use timers. And, I have to agree with your point about TriggerSleepActions: Don't trust them. TimerHandles are just leet hax!
... PolledWaits, are even worse than TriggerSleepActions, imo...
function PolledWait takes real duration returns nothing
local timer t
local real timeRemaining
if (duration > 0) then
set t = CreateTimer()
call TimerStart(t, duration, false, null)
loop
set timeRemaining = TimerGetRemaining(t)
exitwhen timeRemaining <= 0
// If we have a bit of time left, skip past 10% of the remaining
// duration instead of checking every interval, to minimize the
// polling on long waits.
if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
call TriggerSleepAction(0.1 * timeRemaining)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
call DestroyTimer(t)
endif
endfunction
Sure, they use Timers, but in the end they still use TriggerSleepActions, even if 0.1 by 0.1...