From 70f07196ea1c5974f3c9e0cb7329691c5f606115 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 25 Dec 2011 01:54:29 +0100 Subject: [PATCH] gettimeofday() should return int. --- gfx/gfx_common.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/gfx/gfx_common.c b/gfx/gfx_common.c index a54cd7f12b..91dbd1a62c 100644 --- a/gfx/gfx_common.c +++ b/gfx/gfx_common.c @@ -23,13 +23,26 @@ #else #include #include -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 +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 -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;