| 01-14-2006, 11:38 PM | #1 |
I've been searching on the forum and I've read that TriggerSleepAction() could cause desyncs because of lag. I know that PolledWait() uses a timer in conjunction with TriggerSleepAction() But, all I really want is a very short delay used for a loop without the overhead of PolledWait(). How much of a risk am I taking by using TriggerSleepAction()? Are there certain situations where TriggerSleepAction() is fine and some where it is not? In my current situation, I would be using a short TriggerSleepAction() constantly. |
| 01-14-2006, 11:43 PM | #2 |
TriggerSleepAction wont last shorter than polledwait. Minimum wait time is around.. 0.25 s (ithink). For shorter durations, avoid using triggersleep and use timers. |
| 01-14-2006, 11:52 PM | #3 |
I realize that timers will give me much shorter, exact waits, but I don't need an exact wait, I only need a short one, about the length of a minimum TriggerSleepAction. I'm wondering though about the ramifications of using many TriggerSleepActions() in regards to desynchronization. |
| 01-15-2006, 12:01 AM | #4 |
On short waits polledwait is the same as triggersleep in time. So dont use triggersleep. I does desync, but only rarely on long waits when someone lags in between. |
| 01-15-2006, 12:32 AM | #5 |
Never heard of dysnchs with TriggerSleepAction, if a player lags then the wait should stop for all players until the lag is over. |
| 01-15-2006, 12:49 AM | #6 |
TriggerSleepAction doesn't have any direct relationship with desyncs or lag |
| 01-15-2006, 03:05 AM | #7 |
Also for such a short wait I'd use TriggerSleepAction(0) instead of PolledWait, because polled wait just adds the overhead of a new temporary timer and internally still calls TriggerSleepAction. |
| 01-15-2006, 07:43 AM | #8 | |
Quote:
|
| 01-15-2006, 09:24 AM | #9 | |
Quote:
|
| 01-15-2006, 10:42 AM | #10 |
By the way don't use regular PolledWait, it has a leak. Better fix the leak and then use it. |
