From 420d2bc5020ff5e2075314a188c6cfb75bffc2a1 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Thu, 21 Jan 2010 19:55:01 +0000 Subject: (Minor timer library code cleanup) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4917 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Timer.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Source/Core/Common/Src/Timer.cpp') diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index 3f851ce8cc..4759729769 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -18,21 +18,31 @@ #include #include +#ifdef _WIN32 +#include +#include +#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 -- cgit v1.2.3