ADTF
cCPUUsage

This helper classes can be used to determine the current CPU usage. More...

Public Member Functions

tVoid Init ()
 Initializer for CPU usage calculations. More...
 
tVoid GetCurrent (tFloat64 &fUsagePercentTotal, tFloat64 &fUsagePercentByMe)
 Getter for the current CPU usage. More...
 

Private Attributes

tUInt64 nLastSysUser
 
tUInt64 nLastSysUserNice
 
tUInt64 nLastSysKernel
 
tUInt64 nLastSysIdle
 
clock_t nLastProcTotal
 
clock_t nLastProcKernel
 
clock_t nLastProcUser
 

Detailed Description

This helper classes can be used to determine the current CPU usage.

Definition at line 16 of file cpuusage.h.

Member Function Documentation

◆ GetCurrent()

tVoid GetCurrent ( tFloat64 fUsagePercentTotal,
tFloat64 fUsagePercentByMe 
)

Getter for the current CPU usage.

Parameters
[out]fUsagePercentTotal- the total usage by your system in percent
[out]fUsagePercentByMe- the total usage required by you in percent
Returns
tVoid

◆ Init()

tVoid Init ( )

Initializer for CPU usage calculations.

Returns
tVoid