From 132ecccb96ce6f10eb0e64cc4238a0c12eb936e5 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Wed, 22 Jul 2009 23:22:44 +0200 Subject: [PATCH] Add clock_gettime() emulation. --- glcapture.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; +} -- 2.39.2