[+] AuHwInfo::GetProcessCPUUtilization
This commit is contained in:
parent
bdf5b44cd3
commit
178d2d79a7
@ -25,4 +25,6 @@ namespace Aurora::HWInfo
|
|||||||
((AuUInt32, bTriggered), (bool, bThreadMode)),
|
((AuUInt32, bTriggered), (bool, bThreadMode)),
|
||||||
AuUInt32 uMinSamplePeriodMS = AuSToMS<AuUInt32>(1), // May be zero
|
AuUInt32 uMinSamplePeriodMS = AuSToMS<AuUInt32>(1), // May be zero
|
||||||
bool bThreadMode = false); // False = Sample Process Usage | True = Sample Thread Usage
|
bool bThreadMode = false); // False = Sample Process Usage | True = Sample Thread Usage
|
||||||
|
|
||||||
|
AUKN_SYM double GetProcessCPUUtilization();
|
||||||
}
|
}
|
@ -102,6 +102,12 @@ namespace Aurora::HWInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AUKN_SYM double GetProcessCPUUtilization()
|
||||||
|
{
|
||||||
|
static CpuLoadSamplerImpl gSampler(AuSToMS<AuUInt32>(1), false);
|
||||||
|
return gSampler.GetLoad();
|
||||||
|
}
|
||||||
|
|
||||||
AUKN_SYM ICpuLoadSampler *CpuLoadSamplerNew(AuUInt32 uMinSamplePeriodMS,
|
AUKN_SYM ICpuLoadSampler *CpuLoadSamplerNew(AuUInt32 uMinSamplePeriodMS,
|
||||||
bool bThreadMode)
|
bool bThreadMode)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user