mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Added Overall CPU and RAM resource monitors for Windows Profile.
This commit is contained in:
parent
5f281480e1
commit
13e298a9e8
@ -119,6 +119,7 @@ namespace Artemis.Modules.Effects.WindowsProfile
|
|||||||
_cores.Add(null);
|
_cores.Add(null);
|
||||||
coreCount++;
|
coreCount++;
|
||||||
}
|
}
|
||||||
|
_overallCPU = GetOverallPerformanceCounter();
|
||||||
}
|
}
|
||||||
catch (InvalidOperationException)
|
catch (InvalidOperationException)
|
||||||
{
|
{
|
||||||
@ -129,7 +130,7 @@ namespace Artemis.Modules.Effects.WindowsProfile
|
|||||||
|
|
||||||
private void UpdateCpu(WindowsProfileDataModel dataModel)
|
private void UpdateCpu(WindowsProfileDataModel dataModel)
|
||||||
{
|
{
|
||||||
if (_cores == null)
|
if (_cores == null || _overallCPU == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// CPU is only updated every 15 frames, the performance counter gives 0 if updated too often
|
// CPU is only updated every 15 frames, the performance counter gives 0 if updated too often
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user