X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..5b6ec9803a058368a1b240a22d444c7301c5715a:/src/common/timercmn.cpp diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index a13496beff..93e8beb8cc 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -39,7 +39,8 @@ #include #endif -#if defined(__linux__) || defined(__SVR4__) || defined(__SYSV__) || defined(__SGI__) || defined(__ALPHA__) || defined(__GNUWIN32__) +#if defined(__linux__) || defined(__SVR4__) || defined(__SYSV__) || defined(__SGI__) || \ + defined(__ALPHA__) || defined(__GNUWIN32__) || defined(__FreeBSD__) || defined(__NetBSD__) #include #endif @@ -69,7 +70,7 @@ void wxStartTimer(void) { #if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) struct timeval tp; -#ifdef __SYSV__ +#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__)) gettimeofday(&tp, (struct timezone *)NULL); #else gettimeofday(&tp); @@ -93,7 +94,7 @@ long wxGetElapsedTime(bool resetTimer) { #if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) // || defined(__AIXV3__) struct timeval tp; -#ifdef __SYSV__ +#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__)) gettimeofday(&tp, (struct timezone *)NULL); #else gettimeofday(&tp); @@ -144,7 +145,7 @@ bool wxGetLocalTime(long *timeZone, int *dstObserved) *dstObserved = tp->tm_isdst; #else -#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WINDOWS__)) && !defined(__GNUWIN32__)) +#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__)) && !defined(__GNUWIN32__)) #ifdef __BORLANDC__ /* Borland uses underscores */ *timeZone = _timezone; @@ -168,6 +169,8 @@ bool wxGetLocalTime(long *timeZone, int *dstObserved) *timeZone = tp->tm_gmtoff; // ??? *dstObserved = tp->tm_isdst; #endif +#elif defined(__WXSTUBS__) + return FALSE; #else // #error wxGetLocalTime not implemented. struct timeval tp; @@ -187,7 +190,7 @@ long wxGetCurrentTime(void) { #if defined(__xlC__) || defined(__AIX__) || defined(__SVR4__) || defined(__SYSV__) // || defined(__AIXV3__) struct timeval tp; -#ifdef __SYSV__ +#if defined(__SYSV__) || (defined (__GNUWIN32__) && !defined (__MINGW32__)) gettimeofday(&tp, (struct timezone *)NULL); #else gettimeofday(&tp);