X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffreeglut_main_x11.c;h=75bc54c0233f275901e5548834bb3edb3c41e31d;hb=7b016df720765f1e7bd89bc4b0d15b340b8b4726;hp=33553e3d5fc10d0a94a2265099d2d62f2f9c9658;hpb=d54280cbf8b61c32dec35d8b9858bda78e17495c;p=freeglut diff --git a/src/x11/freeglut_main_x11.c b/src/x11/freeglut_main_x11.c index 33553e3..75bc54c 100644 --- a/src/x11/freeglut_main_x11.c +++ b/src/x11/freeglut_main_x11.c @@ -91,11 +91,17 @@ void fgPlatformDisplayWindow ( SFG_Window *window ) unsigned long fgPlatformSystemTime ( void ) { +#ifdef CLOCK_MONOTONIC + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + return now.tv_nsec/1000000 + now.tv_sec*1000; +#else #ifdef HAVE_GETTIMEOFDAY struct timeval now; gettimeofday( &now, NULL ); return now.tv_usec/1000 + now.tv_sec*1000; #endif +#endif } /*