mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 09:35:21 +00:00
Remove bloat code for custom gettimeofday implementation
This commit is contained in:
parent
38cde55b78
commit
ec291ed398
@ -23,27 +23,25 @@
|
||||
#include <winsock2.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
static int gettimeofday(struct timeval *val, void *dummy)
|
||||
{
|
||||
(void)dummy;
|
||||
#ifdef _XBOX360
|
||||
DWORD msec = GetTickCount();
|
||||
#else
|
||||
DWORD msec = timeGetTime();
|
||||
#endif
|
||||
uint64_t usec = msec * 1000;
|
||||
val->tv_sec = usec / 1000000;
|
||||
val->tv_usec = usec % 1000000;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/sys_time.h>
|
||||
#if defined(__CELLOS_LV2__) || defined(_MSC_VER)
|
||||
static int gettimeofday(struct timeval *val, void *dummy)
|
||||
{
|
||||
(void)dummy;
|
||||
#if defined(_MSC_VER) && !defined(_XBOX360)
|
||||
DWORD msec = timeGetTime();
|
||||
#elif defined(_XBOX360)
|
||||
DWORD msec = GetTickCount();
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include <sys/sys_time.h>
|
||||
uint64_t usec = sys_time_get_system_time();
|
||||
#else
|
||||
uint64_t usec = msec * 1000;
|
||||
#endif
|
||||
|
||||
val->tv_sec = usec / 1000000;
|
||||
val->tv_usec = usec % 1000000;
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user