Module cpu

Source
Expand description

module for accessing CPU related information.

Structs§

CpuTime
Struct to represent CPU times. All values are in seconds.

Functions§

cpu_count
Return the number of CPUs in the system or None if undetermined. If the param is set to true, the result will be the number of logical CPUs, false will return the number of physical CPUs.
per_cpu_time
Return per CPU times as a vector of CpuTime.
system_time
Return whole system CPU times as CpuTime.