HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

PolledWait verses TriggerSleep

12-22-2004, 11:33 AM#1
Beta_Tester
I was thinking, you guys have been talking about how a triggersleep statement can reduce lag be letting other threads state, right?

Now wouldn't it be a better idea for sysnc if you use polledwaits, you get the same effect as vex mentioned and you keep the computers more "in line"

What does everyone think about this?
12-22-2004, 05:23 PM#2
Ryude
I'm not sure but I believe PolledWait is an actual time wait, and TriggerSleepAction waits determined on how long it takes all the other threads to be processed then returns.
12-22-2004, 11:40 PM#3
AIAndy
PolledWait actually uses TriggerSleepAction. What it does is use a timer to have an exact measure of the time and then use TriggerSleepAction to approximate the actual wait in first large and then smaller steps.
12-23-2004, 12:16 AM#4
Beta_Tester
so wouldnt it be a better idea to use polled wait to prevent desync?
12-24-2004, 02:19 AM#5
AIAndy
No, neither of them cause desyncs by themselves. Only use polled wait when you need the extra accuracy compared to TriggerSleepAction. And if you need it really accurate use a timer instead.