From: sgunderson@bigfoot.com <> Date: Wed, 22 Jul 2009 21:22:44 +0000 (+0200) Subject: Add clock_gettime() emulation. X-Git-Url: https://git.sesse.net/?p=glcapture;a=commitdiff_plain;h=132ecccb96ce6f10eb0e64cc4238a0c12eb936e5 Add clock_gettime() emulation. --- diff --git a/glcapture.c b/glcapture.c index 54fee16..3bf7171 100644 --- a/glcapture.c +++ b/glcapture.c @@ -58,3 +58,11 @@ int gettimeofday(struct timeval *tv, struct timezone *tz) tv->tv_usec = ((double)(frameno % FPS) / FPS) * 1000000; return 0; } + +int clock_gettime(clockid_t clk_id, struct timespec *tp) +{ + tp->tv_sec = frameno / FPS; + tp->tv_nsec = ((double)(frameno % FPS) / FPS) * 1e9; + + return 0; +}