Sign in to follow this  
Followers 0
ioliver

While...wend Uses All Processor Time

4 posts in this topic

While 1

Wend

This loop puts my CPU usage at 99 even if there is noting in the loop. Any idea?


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites



that is correct... It basically does what you ask it to do.... :whistle:

just add a Sleep(100) to have it pause a little every loop..


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

99% computer usage:

While 1
Wend

00.01% computer usage:

While 1
  sleep(1); virtually no wait time.
Wend

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Thank you very much... That sleep(1) will save me lots of processor time in at least 2 of my scripts.

Thanks again


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0