useCPULoad

useCPULoad(params?): Object

Returns current information about the CPU status.

Params (optional)

ParameterRequiredTypeDescription
onCPULoadChangeFunctionEvent callback for the cpu-load-change event

Return type

An object with the following properties:

NameTypeDescription
statestring'low' | 'high', an assessment of the current CPU state. See cpu-load-change for more details
reasonstring'none' | 'encode' | 'decode' | 'scheduleDuration'. See cpu-load-change for more details

Sample code