(Minor timer library code cleanup)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4917 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2010-01-21 19:55:01 +00:00
parent 9893122a58
commit 420d2bc502
3 changed files with 20 additions and 15 deletions

View File

@ -18,21 +18,31 @@
#include <time.h>
#include <sys/timeb.h>
#ifdef _WIN32
#include <Windows.h>
#include <mmsystem.h>
#endif
#include "Common.h"
#include "Timer.h"
#include "StringUtil.h"
namespace Common
{
#ifdef __GNUC__
u32 timeGetTime()
u32 Timer::GetTimeMs()
{
struct timeb t;
ftime(&t);
return((u32)(t.time * 1000 + t.millitm));
return ((u32)(t.time * 1000 + t.millitm));
}
#else
u32 Timer::GetTimeMs() {
return timeGetTime();
}
#endif
namespace Common
{
// --------------------------------------------
// Initiate, Start, Stop, and Update the time