]> git.saurik.com Git - wxWidgets.git/commitdiff
made wxGetTimeOfDay() public
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 Mar 2007 01:44:16 +0000 (01:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 Mar 2007 01:44:16 +0000 (01:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/stopwatch.h
src/common/stopwatch.cpp

index dec4fa2905bb7d7ae04c320c61dcbe2def3b3213..cc12e772a0ae3a6e298f8612011a145c7990fb0b 100644 (file)
@@ -99,4 +99,14 @@ extern wxMilliClock_t WXDLLIMPEXP_BASE wxGetLocalTimeMillis();
 
 #define wxGetCurrentTime() wxGetLocalTime()
 
+// on some really old systems gettimeofday() doesn't have the second argument,
+// define wxGetTimeOfDay() to hide this difference
+#ifdef HAVE_GETTIMEOFDAY
+    #ifdef WX_GETTIMEOFDAY_NO_TZ
+        #define wxGetTimeOfDay(tv)      gettimeofday(tv)
+    #else
+        #define wxGetTimeOfDay(tv)      gettimeofday((tv), NULL)
+    #endif
+#endif // HAVE_GETTIMEOFDAY
+
 #endif // _WX_STOPWATCH_H_
index 6e0754d2d089cd78a1f620fa09e7ee4a7b1754fa..5a3776da285e13659f9c1e5135a3b472eb0ee652 100644 (file)
     #include <SystemMgr.h>
 #endif
 
-// ----------------------------------------------------------------------------
-// macros
-// ----------------------------------------------------------------------------
-
-// on some really old systems gettimeofday() doesn't have the second argument,
-// define wxGetTimeOfDay() to hide this difference
-#ifdef HAVE_GETTIMEOFDAY
-    #ifdef WX_GETTIMEOFDAY_NO_TZ
-        struct timezone;
-        #define wxGetTimeOfDay(tv, tz)      gettimeofday(tv)
-    #else
-        #define wxGetTimeOfDay(tv, tz)      gettimeofday((tv), (tz))
-    #endif
-#endif // HAVE_GETTIMEOFDAY
-
 // ============================================================================
 // implementation
 // ============================================================================
@@ -279,7 +264,7 @@ wxLongLong wxGetLocalTimeMillis()
 
 #elif defined(HAVE_GETTIMEOFDAY)
     struct timeval tp;
-    if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
+    if ( wxGetTimeOfDay(&tp) != -1 )
     {
         val *= tp.tv_sec;
         return (val + (tp.tv_usec / 1000));