03-26-2009 12:05 PM
Is there any difference between a Timed loop and a While loop with a wait function in it?
I tried to test the difference by running one of each loop in parallel, then checking the speed:
From what I saw, they run either exactly the same or within 1 ms of each other.
But that 1ms, if you were to look at % error would be X*10^-7 so it doesnt make much difference.
Does anyone know why someone would use one over the other?
Solved! Go to Solution.
03-26-2009 12:12 PM
The main difference is you normally want a timed loop in a RT OS, while a "normal" loop in Windows.
You can control priority/processor/etc in a timed loop.
But the biggest difference is the lack of multithreading in a timed-loop. (In my opinion)
03-26-2009 12:12 PM
Cory,
I cannot answer your question exactly but I will point out that the Timed loop is tied to one OS and is not cross platform.
Lynn