in reply to Limiting CPU usage on this program...
Like everybody already said, adding a sleep command
is the best solution. Another solution that you might
consider in addition to the sleep would be something like
this:
system( "renice 10 $$" );
Of course, this is assuming that your OS has a renice command. And, you'd probably want to specify the full path to wherever it is located.
|
|---|