04-11-2011 02:36 AM
Hello folks!
I have a generic application which execute a timed loop sequence. Inside loop, I tried to generate a random number and get the curent time/date when the number was generated.As you can see,
E.g :I set the period to 50 ms.In ElapseTime indicator , the difference between two successive elements varies between 47ms and 62 ms. My intention is to obtain 50 for this diferrrence.
Solved! Go to Solution.
04-11-2011 03:34 AM
I get exactly 50ms increments if I set it to 50ms. What is your OS?
04-11-2011 03:43 AM - edited 04-11-2011 03:44 AM
Hi,
I also get those 47 to 62ms variations when setting a delay of 50ms (WinXP). That is due to limitations of the OS: before Win7 (or WinVista?) the resolution of GetDateTime is ~16ms, whereas Win7 offers a resolution of 1ms.
So the problem is not the exact timing of the TimedLoop but the limitations of measuring time on Windows OS...
04-11-2011 05:19 AM
The OS is WinXP.
Is there a way to "cheat" that?
Thanks for your replies!
04-11-2011 05:55 AM