\r
extern void fgPlatformReshapeWindow ( SFG_Window *window, int width, int height );\r
extern void fgPlatformDisplayWindow ( SFG_Window *window );\r
+extern unsigned long fgPlatformSystemTime ( void );\r
extern void fgPlatformSleepForEvents( long msec );\r
extern void fgPlatformProcessSingleEvent ( void );\r
extern void fgPlatformMainLoopPreliminaryWork ( void );\r
{\r
fghRedrawWindow ( window ) ;\r
}\r
+\r
+\r
+unsigned long fgPlatformSystemTime ( void )\r
+{\r
+#if TARGET_HOST_SOLARIS || HAVE_GETTIMEOFDAY\r
+ struct timeval now;\r
+ gettimeofday( &now, NULL );\r
+ return now.tv_usec/1000 + now.tv_sec*1000;\r
+#endif\r
+}\r
#endif\r
\r
static void fghcbDisplayWindow( SFG_Window *window,\r
* when subtracting an initial start time, unless the total time exceeds\r
* 32-bit, where the GLUT API return value is also overflowed.\r
*/ \r
-unsigned long fgSystemTime(void) {\r
-#if TARGET_HOST_SOLARIS || HAVE_GETTIMEOFDAY\r
- struct timeval now;\r
- gettimeofday( &now, NULL );\r
- return now.tv_usec/1000 + now.tv_sec*1000;\r
-#elif TARGET_HOST_MS_WINDOWS\r
-# if defined(_WIN32_WCE)\r
- return GetTickCount();\r
-# else\r
- return timeGetTime();\r
-# endif\r
-#endif\r
+unsigned long fgSystemTime(void)\r
+{\r
+ return fgPlatformSystemTime ();\r
}\r
\r
/*\r
}\r
\r
\r
+unsigned long fgPlatformSystemTime ( void )\r
+{\r
+#if defined(_WIN32_WCE)\r
+ return GetTickCount();\r
+#else\r
+ return timeGetTime();\r
+#endif\r
+}\r
+\r
+\r
void fgPlatformSleepForEvents( long msec )\r
{\r
MsgWaitForMultipleObjects( 0, NULL, FALSE, msec, QS_ALLINPUT );\r