GetCPULoad()
From ElectronicWar
| Function information for getCPULoad() | |
| Function | getCPULoad() |
| Parameters | None |
| API | Watch/Attacking |
| Cost | $10(attack) $100(watch) |
| Level | 10 |
| CPU Usage | 2 |
| Description | Returns a float representing the current CPU load of the computer performing the attack or firing the watch. |
[edit] Watch Example
getCPULoad() can be used in Watch scripts to check whether or not the system would be able to handle counterattacking the attacker. This would be useful to stop your system from counter attacking if it is going to overheat:
if(getCPULoad()<40){ counterAttack(); }
This stop the watch from performing a counterattack if the CPU load is equal to or less than 40.
[edit] Attack Example
getCPULoad() can be used in attack scripts to cancel your attack if your CPU is reaching a certain load:
if(getCPULoad()>40){ cancelAttack(); }
This would automatically cancel the attack if the CPU load goes over 40 and would prevent the system/port from overheating.

