]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stopwatch.h
test whether pointer is non-NULL before using it, not after, in wxAnimation::Load...
[wxWidgets.git] / include / wx / stopwatch.h
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_