On 8/10/2010 5:29 PM, sihd0 wrote:
> Hello, I am a new and upcoming programmer and I was wondering if anyone knows 
> how to limit the speed at which a program will execute. I am planning to 
> begin research into factoring and would like to only use about 10% of the 
> available resources on my home computer. So can anyone help me out here?

What exactly is the purpose of limiting the speed of execution?  If it 
is to learn how the program operates, I suggest using a debugger and 
setting a breakpoint at the start of the program.  Then you can step 
through line by line.

The best GUI-based debuggers will let you hover over variable names and 
see their values visually at each point where the debugger pauses the 
running program.

If, for some strange reason, you truly need to limit the speed of a 
program as it executes, there are several tools out there that can do 
the job without burning CPU cycles.  Besides, most modern processors are 
multithreaded/multicore so simply burning CPU cycles won't do anything 
to slow down a program.

-- 
Thomas Hruska
CubicleSoft President

Barebones CMS is a high-performance, open source content management 
system for web developers operating in a team environment.

An open source CubicleSoft initiative.
Your choice of a MIT or LGPL license.

http://barebonescms.com/

Reply via email to