MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / showEmuSpeed

Method showEmuSpeed

gui/qt/mainwindow.cpp:1601–1612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1599}
1600
1601void MainWindow::showEmuSpeed(double emuTime) {
1602 static double emuRunTime = 0;
1603 static uint32_t emuRunCount = 0;
1604 emuRunTime += emuTime;
1605 emuRunCount++;
1606 if (m_timerEmuTriggered && emuRunTime > 0) {
1607 unsigned int speed = (unsigned int)round(emuRunCount * 100.0 / emuRunTime);
1608 m_speedLabel.setText(QStringLiteral(" ") + tr("Emulated Speed: ") + QString::number(speed) + QStringLiteral("%"));
1609 emuRunTime = emuRunCount = 0;
1610 m_timerEmuTriggered = false;
1611 }
1612}
1613
1614void MainWindow::timeoutEmuSpeed() {
1615 m_speedLabel.setText(QStringLiteral(" ") + tr("Emulated Speed: ") + tr("N/A"));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected