diff options
| author | hrydgard <hrydgard@gmail.com> | 2010-01-21 19:55:01 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2010-01-21 19:55:01 +0000 |
| commit | 420d2bc5020ff5e2075314a188c6cfb75bffc2a1 (patch) | |
| tree | 39c9e911c59629759e1eaf88da4c892daeb4c567 /Source/Core/Common/Src/Timer.cpp | |
| parent | 9893122a5879c330bfa5d2724ff80d21b30a7dab (diff) | |
(Minor timer library code cleanup)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4917 8ced0084-cf51-0410-be5f-012b33b47a6e
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 |
