Browse Source

Disable UI CPU meter.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
06827ecd92
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      src/app/MenuBar.cpp

+ 9
- 9
src/app/MenuBar.cpp View File

@@ -824,18 +824,18 @@ struct MeterLabel : ui::Label {
}

// Compute UI thread CPU
double time = system::getTime();
double uiDuration = time - uiLastTime;
if (uiDuration >= 1.0) {
double threadTime = system::getThreadTime();
uiFrac = (threadTime - uiLastThreadTime) / uiDuration;
uiLastThreadTime = threadTime;
uiLastTime = time;
}
// double time = system::getTime();
// double uiDuration = time - uiLastTime;
// if (uiDuration >= 1.0) {
// double threadTime = system::getThreadTime();
// uiFrac = (threadTime - uiLastThreadTime) / uiDuration;
// uiLastThreadTime = threadTime;
// uiLastTime = time;
// }

double meterAverage = APP->engine->getMeterAverage();
double meterMax = APP->engine->getMeterMax();
text = string::f("%.1f fps %.1f%% avg %.1f%% max %.1f%% UI", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100, uiFrac * 100);
text = string::f("%.1f fps %.1f%% avg %.1f%% max", 1.0 / frameDurationAvg, meterAverage * 100, meterMax * 100);
Label::step();
}
};


Loading…
Cancel
Save