mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added NVidia GPU usage
This commit is contained in:
@@ -50,7 +50,19 @@ public class NvidiaGpuTemperatureProvider : IGpuTemperatureProvider
|
||||
|
||||
public int? GetGpuUse()
|
||||
{
|
||||
return -1;
|
||||
if (!IsValid)
|
||||
return null;
|
||||
|
||||
PhysicalGPU internalGpu = _internalGpu!;
|
||||
|
||||
IUtilizationDomainInfo? gpuUsage = GPUApi.GetUsages(internalGpu.Handle).GPU;
|
||||
|
||||
if (gpuUsage == null)
|
||||
return null;
|
||||
|
||||
return
|
||||
(int)gpuUsage?.Percentage;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user