HOW to wait or sleep to free CPU time 
Author Message
 HOW to wait or sleep to free CPU time

What is the best way to wait/sleep for a certain amount of time,
so the CPU can be freed to allow other processes to execute.



Tue, 13 Aug 2002 03:00:00 GMT  
 HOW to wait or sleep to free CPU time
If you have MSDN CD try searching under "sleep" in the API's

--
=-=-=-=-=-=-=-=-=
Steven Degnian
Oz Programmers
Send all answers to the Newsgroup.
';';';';';';';';';';';';';';';';';';';';';';';';';';';';';';';';';';


Quote:

> What is the best way to wait/sleep for a certain amount of time,
> so the CPU can be freed to allow other processes to execute.



Tue, 13 Aug 2002 03:00:00 GMT  
 HOW to wait or sleep to free CPU time


Quote:

> What is the best way to wait/sleep for a certain amount of time,
> so the CPU can be freed to allow other processes to execute.

If you don't want to use the sleep API:

t = timer
do until timer > t + delaytime
    DoEvents
loop

The DoEvents lets the system do anything else until delaytime has passed.
Please note that this code will fail if fired at midnight because timer
won't grow beyond midnight.

Heinrich



Tue, 13 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

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

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

4. VB Sleep Hangs up CPU

5. VB Sleep is causing the CPU to Hang!

6. wscript.sleep uses 100% CPU

7. wait or sleep

8. Wait/sleep/pause function

9. Sleep / Wait function ??

10. Waiting: sleeping?

11. Pause, Delay, Wait, or Sleep Function

12. BEEP and WAIT/SLEEP in IE5.5

 

 
Powered by phpBB® Forum Software