Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Show sim speed and timescale seperately
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 25, 2023
1 parent 23dfe9c commit e503422
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Managers/PerformanceMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace RTE {
std::snprintf(str, sizeof(str), "Frame: %.1fms | Update: %.1fms | Draw: %.1fms", m_MSPFAverage, m_MSPUAverage, m_MSPDAverage);
guiFont->DrawAligned(&drawBitmap, c_StatsOffsetX, c_StatsHeight + 10, str, GUIFont::Left);

std::snprintf(str, sizeof(str), "Time Scale: x%.2f ([1]-, [2]+, [Ctrl+1]Rst)", g_TimerMan.GetSimSpeed());
std::snprintf(str, sizeof(str), "Time Scale: x%.2f ([1]-, [2]+, [Ctrl+1]Rst) | Sim Speed: x%.2f", g_TimerMan.GetTimeScale(), g_TimerMan.GetSimSpeed());
guiFont->DrawAligned(&drawBitmap, c_StatsOffsetX, c_StatsHeight + 20, str, GUIFont::Left);

std::snprintf(str, sizeof(str), "Real to Sim Cap: %.2f ms ([3]-, [4]+, [Ctrl+3]Rst)", g_TimerMan.GetRealToSimCap() * 1000.0F);
Expand Down
2 changes: 0 additions & 2 deletions Managers/TimerMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ namespace RTE {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma optimize("", off)
void TimerMan::Update() {
long long prevTime = m_RealTimeTicks;
m_RealTimeTicks = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - m_StartTime).count();
Expand All @@ -115,5 +114,4 @@ namespace RTE {

m_SimSpeed = std::min(GetDeltaTimeMS() / g_PerformanceMan.GetMSPSUAverage(), GetTimeScale());
}
#pragma optimize("", on)
}

0 comments on commit e503422

Please sign in to comment.