NetBSD: Rework CPU counting.

This commit is contained in:
fraggerfox
2021-08-03 08:35:02 +05:30
committed by BenBE
parent ed82ce6456
commit 2e3f34f5c1
3 changed files with 78 additions and 30 deletions

View File

@ -200,7 +200,7 @@ int Platform_getMaxPid() {
double Platform_setCPUValues(Meter* this, int cpu) {
const NetBSDProcessList* npl = (const NetBSDProcessList*) this->pl;
const CPUData* cpuData = &npl->cpus[cpu];
const CPUData* cpuData = &npl->cpuData[cpu];
double total = cpuData->totalPeriod == 0 ? 1 : cpuData->totalPeriod;
double totalPercent;
double* v = this->values;