| 02-06-2007, 01:12 AM | #1 |
I know that TriggerSleepAction() has a minmum time of 0.10 seconds or something like that. Does that minimum time apply to triggers that run "Every X seconds of game-time"? If, for instance, I used this event: Trigger: Time - Every 0.06 seconds of game-time |
| 02-06-2007, 01:17 AM | #2 |
Time - Every 0.06 seconds of game-time Runs every 0.06 Seconds call PolledWait() and TriggerSleepAction() wait atleast 0.27 seconds give or take a few 0.01's so no I dont belive it does effect it to test |
| 02-06-2007, 01:42 AM | #3 |
Why thank you, Mythic Fr0st. They do indeed run at different intervals. Rep'd! |
| 02-06-2007, 01:50 AM | #4 |
Hmm, Thanks Mr Grammer. I guess I must talk perfectly now lol. (Feel's his typing being watched) I've never been +repped on here before lol Darn, my grammer still is horrible lol |
| 02-06-2007, 02:02 AM | #5 |
Yes, it does not apply because the trigger actually creates a repeating timer, which calls back to the function you have made in that trigger. |
| 02-06-2007, 02:02 AM | #6 | ||
Spam. That it is. It's rather atrocious; but at least you're better than: Quote:
Oh, and I have a tendancy to rep people for being nice and all that jazz, you know. Just look at Jokes-On-You's public profile: Quote:
|
| 02-06-2007, 02:28 AM | #7 |
Hehehe. :) |
| 02-06-2007, 02:52 AM | #8 |
Mystic Fr0st seemed to cover everything. However, I believe I was told the minimum wait time was around 0.10 seconds and not .27. I'll have to double check to be sure. EDIT: I believe this defines the minimum wait time. JASS:constant real bj_POLLED_WAIT_INTERVAL = 0.10 |
| 02-06-2007, 02:54 AM | #9 |
Hmm, either way, I was told 0.27, but either way, its a sad 'extra" amount of wait time:( Your probably right |
| 02-06-2007, 04:43 AM | #10 |
I think 0.27 is the time, BJ_POLLED_WAIT_INTERVAL is used in this: JASS: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 |
