diff options
Diffstat (limited to 'Source/Core/Common/Src/Timer.cpp')
| -rw-r--r-- | Source/Core/Common/Src/Timer.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
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 <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 |
