Anyway, if you still want to control yourself when the script does the heavy work, using sleep with a variable delay is a bad idea because it could end running at the worst moment, when the load in the machine is very high. A better aproach is to use something like...
while(1) { if (cpu_load() < $limit) { do_heavy() } sleep 10; }
In reply to Re: CPU usage Windows OP
by salva
in thread CPU usage Windows OP
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |