Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer fixes #8922

Merged
merged 1 commit into from
Jul 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions Source/Core/Common/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ void Timer::AddTimeDifference()
// Get the time elapsed since the Start()
u64 Timer::GetTimeElapsed()
{
// If we have not started yet, return 1 (because then I don't
// have to change the FPS calculation in CoreRerecording.cpp .
Tilka marked this conversation as resolved.
Show resolved Hide resolved
// If we have not started yet, return zero
if (m_StartTime == 0)
return 1;
return 0;

// Return the final timer time if the timer is stopped
if (!m_Running)
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Common/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Timer
u64 GetTimeDifference();
void AddTimeDifference();

bool IsRunning() const { return m_Running; }

static void IncreaseResolution();
static void RestoreResolution();
static u64 GetTimeSinceJan1970();
Expand Down