Home > Language Reference > System Functions > GetCpuLoad

GetCpuLoad

The GetCpuLoad function returns the percentage CPU load (from 0 to 100).

Syntax

var = GetCpuLoad()

Parameters

None.

Return value

var, integer, percentage CPU load from 0 to 100. If the function fails, the return value is a negative nonzero value (see System Functions Error Codes).

See also

GetProcessCpuLoad

Examples

a=GetCpuLoad()

msgbox(str$(GetCpuLoad()))    'Str$ converts the integer returned by GetCpuLoad into a string, displayed by msgbox