git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1079
7f0cb862-5218-0410-a997-
914c9d46530a
unsigned long fgPlatformSystemTime ( void )
{
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
#ifdef HAVE_GETTIMEOFDAY
struct timeval now;
gettimeofday( &now, NULL );
return now.tv_usec/1000 + now.tv_sec*1000;
#endif