mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
(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:
parent
9893122a58
commit
420d2bc502
3 changed files with 20 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue