X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffreeglut_main_x11.c;h=75bc54c0233f275901e5548834bb3edb3c41e31d;hb=23582855f9af2b40f4ebb090074ea418ade61853;hp=eeb1288dc9e46667673448efbd605cfbaf886eda;hpb=76169d74298feb3c4976af3f0f10376f56aec38d;p=freeglut diff --git a/src/x11/freeglut_main_x11.c b/src/x11/freeglut_main_x11.c index eeb1288..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 ) { -#if TARGET_HOST_SOLARIS || HAVE_GETTIMEOFDAY +#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 } /*