linux build fix, sorry

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4919 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2010-01-21 20:49:45 +00:00
parent b88a70aa50
commit 8f4149b370
1 changed files with 10 additions and 10 deletions

View File

@ -30,17 +30,17 @@
namespace Common
{
#ifdef __GNUC__
#ifdef _WIN32
u32 Timer::GetTimeMs() {
return timeGetTime();
}
#else
u32 Timer::GetTimeMs()
{
struct timeb t;
ftime(&t);
return ((u32)(t.time * 1000 + t.millitm));
}
#else
u32 Timer::GetTimeMs() {
return timeGetTime();
}
#endif
@ -62,7 +62,7 @@ Timer::Timer()
// Write the starting time
void Timer::Start()
{
m_StartTime = timeGetTime();
m_StartTime = GetTimeMs();
m_Running = true;
}
@ -70,14 +70,14 @@ void Timer::Start()
void Timer::Stop()
{
// Write the final time
m_LastTime = timeGetTime();
m_LastTime = GetTimeMs();
m_Running = false;
}
// Update the last time variable
void Timer::Update()
{
m_LastTime = timeGetTime();
m_LastTime = GetTimeMs();
//TODO(ector) - QPF
}
@ -90,7 +90,7 @@ void Timer::Update()
// Get the number of milliseconds since the last Update()
u64 Timer::GetTimeDifference()
{
return(timeGetTime() - m_LastTime);
return GetTimeMs() - m_LastTime;
}
/* Add the time difference since the last Update() to the starting time. This is used to compensate
@ -115,7 +115,7 @@ u64 Timer::GetTimeElapsed()
// Rrturn the final timer time if the timer is stopped
if (!m_Running) return (m_LastTime - m_StartTime);
return (timeGetTime() - m_StartTime);
return (GetTimeMs() - m_StartTime);
}
// Get the formattet time elapsed since the Start()