|
-
October 1st, 2010, 04:33 AM
#2
Re: Sleep(0)
As soon as you do Sleep() all bets are off on making that 12.5ms mark. Sleep(0) doesn't guarantee you'll return after zero time has elapsed. It merely guarantees that it will return "as soon as windows will allow, at least 0ms after the sleep call". But that could mean several hundred ms. Even without the sleep, the windows scheduler may decide not to give your thread any time for several hundred ms.
If that 12.5ms is really crucial. I'd suggest looking at a multimediatimer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|