Skip to content

Commit

Permalink
Fixed compiler errors when building for C++20.
Browse files Browse the repository at this point in the history
-error C4596: 'Reset': illegal qualified name in member declaration
-error C4596: 'Elapsed': illegal qualified name in member declaration
-error C4596: 'ElapsedMillis': illegal qualified name in member declaration
  • Loading branch information
jeffreylindsey committed May 31, 2022
1 parent 5afd5d6 commit 858aea5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Walnut/src/Walnut/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ namespace Walnut {
Reset();
}

void Timer::Reset()
void Reset()
{
m_Start = std::chrono::high_resolution_clock::now();
}

float Timer::Elapsed()
float Elapsed()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - m_Start).count() * 0.001f * 0.001f * 0.001f;
}

float Timer::ElapsedMillis()
float ElapsedMillis()
{
return Elapsed() * 1000.0f;
}
Expand Down

0 comments on commit 858aea5

Please sign in to comment.