mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
GPU use simplified for now
This commit is contained in:
@@ -14,7 +14,7 @@ public static class HardwareMonitor
|
|||||||
public static string? gpuFan;
|
public static string? gpuFan;
|
||||||
public static string? midFan;
|
public static string? midFan;
|
||||||
|
|
||||||
public static List<int> gpuUsage = new List<int>();
|
//public static List<int> gpuUsage = new List<int>();
|
||||||
public static int? gpuUse;
|
public static int? gpuUse;
|
||||||
|
|
||||||
public static int GetFanMax()
|
public static int GetFanMax()
|
||||||
@@ -100,8 +100,10 @@ public static class HardwareMonitor
|
|||||||
if (gpuTemp is null || gpuTemp < 0)
|
if (gpuTemp is null || gpuTemp < 0)
|
||||||
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
|
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
|
||||||
|
|
||||||
|
/*
|
||||||
gpuUsage.Add(GetGpuUse());
|
gpuUsage.Add(GetGpuUse());
|
||||||
if (gpuUsage.Count > 3) gpuUsage.RemoveAt(0);
|
if (gpuUsage.Count > 3) gpuUsage.RemoveAt(0);
|
||||||
|
*/
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -118,10 +120,7 @@ public static class HardwareMonitor
|
|||||||
|
|
||||||
public static bool IsUsedGPU(int threshold = 50)
|
public static bool IsUsedGPU(int threshold = 50)
|
||||||
{
|
{
|
||||||
if (GetGpuUse() > threshold)
|
return (GetGpuUse() > threshold);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return (gpuUsage.Average() > threshold);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RecreateGpuTemperatureProviderWithDelay()
|
public static void RecreateGpuTemperatureProviderWithDelay()
|
||||||
|
|||||||
@@ -845,10 +845,7 @@ namespace GHelper
|
|||||||
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
|
this.Top = Screen.FromControl(this).WorkingArea.Height - 10 - this.Height;
|
||||||
this.Activate();
|
this.Activate();
|
||||||
|
|
||||||
//aTimer.Interval = 300;
|
|
||||||
aTimer.Enabled = true;
|
aTimer.Enabled = true;
|
||||||
|
|
||||||
//RefreshSensors();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user