mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
Fix small copy-paste error in Timer.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5939 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0d7e4703fb
commit
4230c2501e
@ -110,13 +110,13 @@ u64 Timer::GetTimeElapsed()
|
|||||||
// have to change the FPS calculation in CoreRerecording.cpp .
|
// have to change the FPS calculation in CoreRerecording.cpp .
|
||||||
if (m_StartTime == 0) return 1;
|
if (m_StartTime == 0) return 1;
|
||||||
|
|
||||||
// Rrturn the final timer time if the timer is stopped
|
// Return the final timer time if the timer is stopped
|
||||||
if (!m_Running) return (m_LastTime - m_StartTime);
|
if (!m_Running) return (m_LastTime - m_StartTime);
|
||||||
|
|
||||||
return (GetTimeMs() - m_StartTime);
|
return (GetTimeMs() - m_StartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the formattet time elapsed since the Start()
|
// Get the formatted time elapsed since the Start()
|
||||||
std::string Timer::GetTimeElapsedFormatted() const
|
std::string Timer::GetTimeElapsedFormatted() const
|
||||||
{
|
{
|
||||||
// If we have not started yet, return zero
|
// If we have not started yet, return zero
|
||||||
@ -224,7 +224,7 @@ double Timer::GetDoubleTime()
|
|||||||
struct timeval t;
|
struct timeval t;
|
||||||
(void)gettimeofday(&t, NULL);
|
(void)gettimeofday(&t, NULL);
|
||||||
#endif
|
#endif
|
||||||
// Get continous timestamp
|
// Get continuous timestamp
|
||||||
u64 TmpSeconds = Common::Timer::GetTimeSinceJan1970();
|
u64 TmpSeconds = Common::Timer::GetTimeSinceJan1970();
|
||||||
|
|
||||||
// Remove a few years. We only really want enough seconds to make
|
// Remove a few years. We only really want enough seconds to make
|
||||||
@ -236,7 +236,7 @@ double Timer::GetDoubleTime()
|
|||||||
// Make a smaller integer that fits in the double
|
// Make a smaller integer that fits in the double
|
||||||
u32 Seconds = (u32)TmpSeconds;
|
u32 Seconds = (u32)TmpSeconds;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
double ms = t.tv_usec / 1000.0 / 1000.0;
|
double ms = tp.millitm / 1000.0 / 1000.0;
|
||||||
#else
|
#else
|
||||||
double ms = t.tv_usec / 1000.0 / 1000.0;
|
double ms = t.tv_usec / 1000.0 / 1000.0;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user