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.
In reply to Re: Limiting CPU usage on this program...
by ehdonhon
in thread Limiting CPU usage on this program...
by airblaine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |