Click here to Skip to main content
15,885,934 members
Articles / Desktop Programming / Win32

Better Way to Sleep: Control Execution and Limit CPU Usage by your Threads

Rate me:
Please Sign up or sign in to vote.
4.79/5 (28 votes)
27 Aug 2008CPOL3 min read 104.7K   1.2K   50  
Here is a class that will help you to control the execution of your threads that involves looping/polling and also limits their CPU usage to a specified limit.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions