X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d98a58c543948d84d9287e6fa53a5539d662b7a5..319faba717040fd0af134f4a36fba3f0b8e284ab:/src/common/time.cpp diff --git a/src/common/time.cpp b/src/common/time.cpp index ebc597d969..5b2460ca69 100644 --- a/src/common/time.cpp +++ b/src/common/time.cpp @@ -48,11 +48,6 @@ # endif #endif -#if defined(__MWERKS__) && defined(__WINDOWS__) -# undef HAVE_FTIME -# undef HAVE_GETTIMEOFDAY -#endif - #ifndef __WXWINCE__ #include #else @@ -72,10 +67,6 @@ #include #endif -#if defined(__MWERKS__) && wxUSE_UNICODE - #include -#endif - #if defined(__DJGPP__) || defined(__WINE__) #include #include @@ -223,10 +214,6 @@ int wxGetTimeZone() return WX_TIMEZONE; #elif defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__) return _timezone; - #elif defined(__MWERKS__) - // This is just plain wrong but apparently MetroWerks runtime didn't have - // any way to get the time zone. - return 28800; #else // unknown platform -- assume it has timezone return timezone; #endif // different time zone variables @@ -305,8 +292,6 @@ wxLongLong wxGetUTCTimeUSec() // Get local time as milliseconds since 00:00:00, Jan 1st 1970 wxLongLong wxGetUTCTimeMillis() { - wxLongLong val = MILLISECONDS_PER_SECOND; - // If possible, use a function which avoids conversions from // broken-up time structures to milliseconds #if defined(__WINDOWS__) @@ -319,7 +304,10 @@ wxLongLong wxGetUTCTimeMillis() t /= 10000; t -= wxLL(11644473600000); // Unix - Windows epochs difference in ms. return t; -#elif defined(HAVE_GETTIMEOFDAY) +#else // !__WINDOWS__ + wxLongLong val = MILLISECONDS_PER_SECOND; + +#if defined(HAVE_GETTIMEOFDAY) struct timeval tp; if ( wxGetTimeOfDay(&tp) != -1 ) { @@ -355,6 +343,8 @@ wxLongLong wxGetUTCTimeMillis() val *= wxGetUTCTime(); return val; #endif // time functions + +#endif // __WINDOWS__/!__WINDOWS__ } wxLongLong wxGetLocalTimeMillis()