Commit a9742b32 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

taskmgr: Move out-of-domain checking into PerfDataGetProcessorUsage() and…

taskmgr: Move out-of-domain checking into PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage().
parent 7a9210fa
......@@ -332,11 +332,19 @@ ULONG PerfDataGetProcessCount(void)
ULONG PerfDataGetProcessorUsage(void)
{
if( dbIdleTime < 0.0 )
return 0;
if( dbIdleTime > 100.0 )
return 100;
return (ULONG)dbIdleTime;
}
ULONG PerfDataGetProcessorSystemUsage(void)
{
if( dbKernelTime < 0.0 )
return 0;
if( dbKernelTime > 100.0 )
return 100;
return (ULONG)dbKernelTime;
}
......
......@@ -234,10 +234,6 @@ static DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
*/
CpuUsage = PerfDataGetProcessorUsage();
CpuKernelUsage = PerfDataGetProcessorSystemUsage();
if (CpuUsage < 0 ) CpuUsage = 0;
if (CpuUsage > 100) CpuUsage = 100;
if (CpuKernelUsage < 0) CpuKernelUsage = 0;
if (CpuKernelUsage > 100) CpuKernelUsage = 100;
/*
* Get the memory usage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment