Sleep() api timing??? 
Author Message
 Sleep() api timing???

How accurate is the Sleep() api ?
Can it be 1 ms accurate, that is can you
do a sleep(10) and expect 10ms not 5 or 20ms?
The reason I ask is that I seem to remember that
the hardware clock is only accurate in 18ms
increments, thus you could get 5 - 20ms accuracy
for a 10ms sleep statment.

Any ideas on this ?

--
The wealth of reality, cannot be seen from your locality.



Mon, 20 Aug 2001 03:00:00 GMT  
 Sleep() api timing???
You can get a hires timer from almost every good VB site.  do a search for
hires timer.

HTH's


Quote:
>How accurate is the Sleep() api ?
>Can it be 1 ms accurate, that is can you
>do a sleep(10) and expect 10ms not 5 or 20ms?
>The reason I ask is that I seem to remember that
>the hardware clock is only accurate in 18ms
>increments, thus you could get 5 - 20ms accuracy
>for a 10ms sleep statment.

>Any ideas on this ?

>--
>The wealth of reality, cannot be seen from your locality.



Mon, 20 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sleep API is using up 60% CPU time in the DLL

2. Calculating time to the millisecond for Sleep() API

3. Time of processing, sleep

4. Time Sleep

5. HOW to wait or sleep to free CPU time

6. Need a way to SLEEP for specific amount of time

7. wscript.sleep 1 and wscript.sleep 2

8. best way to sleep or wait specified amount of time

9. Pause/Sleep/Halting code for a time interval

10. Reducing Load on CPU in Access - Sleep API?

11. problems with API sleep

12. Windows API Sleep function

 

 
Powered by phpBB® Forum Software