by Dan East » Feb 11, 2004 @ 5:27am
That may have to do with the thread granularity of the OS. The OS gives apps processing time in chunks, and that may happen to cause an extra long delay with a specific sleep amount.
Since your app is well behaved and Sleeping when it doesn't need CPU time, you could try increasing the priority of your application to see if that fixes your 32 MS problem.
You might want to verify that there isn't a bug in your code. Just call GetTickCount before and after Sleep to see how many milliseconds the call actually consumed.
Dan East