]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/timercmn.cpp
JPEG handler does not read entire file into memory anymore (+, of course, that header...
[wxWidgets.git] / src / common / timercmn.cpp
index bd4d7018d2fe7c26c60dcaa1aa387bf0acffd698..8a34f3cfda7975d70056d5f84ff845f328a2a8c1 100644 (file)
@@ -136,6 +136,12 @@ long wxGetCurrentTime()
 // return GMT time in millisecond
 long wxGetCurrentMTime()
 {
 // return GMT time in millisecond
 long wxGetCurrentMTime()
 {
+#if defined(__WIN32__)
+    SYSTEMTIME st;
+    ::GetLocalTime(&st);
+
+    return 1000*(60*(60*st.wHour+st.wMinute)+st.wSecond)+st.wMilliseconds;
+#else
 #if defined(HAVE_LOCALTIME)
     time_t t0 = time(&t0);
     if ( t0 != (time_t)-1 )
 #if defined(HAVE_LOCALTIME)
     time_t t0 = time(&t0);
     if ( t0 != (time_t)-1 )
@@ -166,6 +172,7 @@ long wxGetCurrentMTime()
     wxLogSysError(_("Failed to get the system time"));
 
     return -1;
     wxLogSysError(_("Failed to get the system time"));
 
     return -1;
+#endif // __WIN32__/!__WIN32__
 }
 
 bool wxGetLocalTime(long *timeZone, int *dstObserved)
 }
 
 bool wxGetLocalTime(long *timeZone, int *dstObserved)