projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CMake now defines HAVE_VFPRINTF for windows; suppress redefinition warning
[freeglut]
/
src
/
x11
/
freeglut_main_x11.c
diff --git
a/src/x11/freeglut_main_x11.c
b/src/x11/freeglut_main_x11.c
index
33553e3
..
75bc54c
100644
(file)
--- 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 )
{
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
+#endif
}
/*
}
/*