in reply to CPU usage Windows OP
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; }
|
|---|