timers internally now use 64bit unsigned int, if available
[freeglut] / src / x11 / freeglut_main_x11.c
index 75bc54c..710535a 100644 (file)
@@ -89,19 +89,17 @@ void fgPlatformDisplayWindow ( SFG_Window *window )
 }
 
 
-unsigned long fgPlatformSystemTime ( void )
+fg_time_t 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
+#elif defined(HAVE_GETTIMEOFDAY)
     struct timeval now;
     gettimeofday( &now, NULL );
     return now.tv_usec/1000 + now.tv_sec*1000;
 #endif
-#endif
 }
 
 /*
@@ -109,7 +107,7 @@ unsigned long fgPlatformSystemTime ( void )
  * happens.
  */
 
-void fgPlatformSleepForEvents( long msec )
+void fgPlatformSleepForEvents( fg_time_t msec )
 {
     /*
      * Possibly due to aggressive use of XFlush() and friends,