mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-08-10 07:25:18 +00:00
Correct cycles per second definition in test harness
This commit is contained in:
@@ -27,7 +27,7 @@ namespace EightBit {
|
|||||||
std::cout << "Guest cycles = " << m_totalCycles << std::endl;
|
std::cout << "Guest cycles = " << m_totalCycles << std::endl;
|
||||||
std::cout << "Seconds = " << getElapsedSeconds() << std::endl;
|
std::cout << "Seconds = " << getElapsedSeconds() << std::endl;
|
||||||
|
|
||||||
std::cout << getCyclesPerSecond() << " MHz" << std::endl;
|
std::cout << getCyclesPerSecond() / 1'000'000 << " MHz" << std::endl;
|
||||||
std::cout << getInstructionsPerSecond() << " instructions per second" << std::endl;
|
std::cout << getInstructionsPerSecond() << " instructions per second" << std::endl;
|
||||||
|
|
||||||
auto elapsedHostCycles = m_finishHostCycles - m_startHostCycles;
|
auto elapsedHostCycles = m_finishHostCycles - m_startHostCycles;
|
||||||
@@ -46,7 +46,7 @@ namespace EightBit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto getCyclesPerSecond() const {
|
[[nodiscard]] auto getCyclesPerSecond() const {
|
||||||
return (m_totalCycles / 1000000 ) / getElapsedSeconds();
|
return m_totalCycles / getElapsedSeconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto getInstructionsPerSecond() {
|
[[nodiscard]] auto getInstructionsPerSecond() {
|
||||||
|
Reference in New Issue
Block a user