mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
gettimeofday() should return int.
This commit is contained in:
parent
c8dee57278
commit
70f07196ea
1 changed files with 14 additions and 12 deletions
|
@ -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…
Add table
Reference in a new issue