-#else // no standard function return tz info
- // special hacks for known compilers
- #if defined(__BORLANDC__) || defined(__VISUALC__)
- *timeZone = _timezone;
- *dstObserved = _daylight;
- #elif defined(__SALFORDC__)
- *timeZone = _timezone;
- *dstObserved = daylight;
- #elif defined(__VISAGECPP__)
- *timeZone = _timezone;
- *dstObserved = daylight;
- #elif defined(__WIN32__)
- TIME_ZONE_INFORMATION tzInfo;
- switch ( GetTimeZoneInformation(&tzInfo) )
- {
- default:
- wxFAIL_MSG(_T("unknown GetTimeZoneInformation return code"));
- // fall through
-
- case TIME_ZONE_ID_UNKNOWN:
- case TIME_ZONE_ID_STANDARD:
- *dstObserved = FALSE;
- break;
-
- case TIME_ZONE_ID_DAYLIGHT:
- *dstObserved = TRUE;
- break;
- }
+#elif defined(HAVE_FTIME)
+ struct timeb tp;
+
+ // ftime() is void and not int in some mingw32 headers, so don't
+ // test the return code (well, it shouldn't fail anyhow...)
+ (void)ftime(&tp);
+ val *= tp.time;
+ return (val + tp.millitm);
+#else // no gettimeofday() nor ftime()
+ // We use wxGetLocalTime() to get the seconds since
+ // 00:00:00 Jan 1st 1970 and then whatever is available
+ // to get millisecond resolution.
+ //
+ // NOTE that this might lead to a problem if the clocks
+ // use different sources, so this approach should be
+ // avoided where possible.
+
+ val *= wxGetLocalTime();
+
+// GRG: This will go soon as all WIN32 seem to have ftime
+#if defined (__WIN32__)
+ // If your platform/compiler needs to use two different functions
+ // to get ms resolution, please do NOT just shut off these warnings,
+ // drop me a line instead at <guille@iies.es>
+ #warning "Possible clock skew bug in wxGetLocalTimeMillis()!"