X-Git-Url: https://git.sesse.net/?p=glcapture;a=blobdiff_plain;f=glcapture.c;h=3bf71717756a7bc1ca95e1ac4b2ee81d20b175b0;hp=54fee16415643de8dd2c671813b8abb5104b40d7;hb=132ecccb96ce6f10eb0e64cc4238a0c12eb936e5;hpb=845916ba6e0a8db9eec83fd3701dae96baba8af7 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; +}