mirror of
https://github.com/libretro/RetroArch
synced 2025-01-06 01:02:15 +00:00
gettimeofday() should return int.
This commit is contained in:
parent
c8dee57278
commit
70f07196ea
@ -23,13 +23,26 @@
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <mmsystem.h>
|
||||
static void gettimeofday(struct timeval *val, void *dummy)
|
||||
static int gettimeofday(struct timeval *val, void *dummy)
|
||||
{
|
||||
(void)dummy;
|
||||
DWORD msec = timeGetTime();
|
||||
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>
|
||||
static int gettimeofday(struct timeval *val, void *dummy)
|
||||
{
|
||||
(void)dummy;
|
||||
uint64_t usec = sys_time_get_system_time();
|
||||
val->tv_sec = usec / 1000000;
|
||||
val->tv_usec = usec % 1000000;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -46,17 +59,6 @@ void gfx_window_title_reset(void)
|
||||
gl_frames = 0;
|
||||
}
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/sys_time.h>
|
||||
static void gettimeofday(struct timeval *val, void *dummy)
|
||||
{
|
||||
(void)dummy;
|
||||
uint64_t usec = sys_time_get_system_time();
|
||||
val->tv_sec = usec / 1000000;
|
||||
val->tv_usec = usec % 1000000;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool gfx_window_title(char *buf, size_t size)
|
||||
{
|
||||
static struct timeval tv;
|
||||
|
Loading…
Reference in New Issue
Block a user