]> git.sesse.net Git - glcapture/commitdiff
Add clock_gettime() emulation. master
authorsgunderson@bigfoot.com <>
Wed, 22 Jul 2009 21:22:44 +0000 (23:22 +0200)
committersgunderson@bigfoot.com <>
Wed, 22 Jul 2009 21:22:44 +0000 (23:22 +0200)
glcapture.c

index 54fee16415643de8dd2c671813b8abb5104b40d7..3bf71717756a7bc1ca95e1ac4b2ee81d20b175b0 100644 (file)
@@ -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;
+}