X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47af912426dcd738f24063fa0952b20682239cdf..7ac05a91abea459438b8ea62074108d3daf39568:/src/common/timercmn.cpp diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index e2aea3bb67..035361aaac 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -55,7 +55,9 @@ #if defined(__VISAGECPP__) && !defined(HAVE_FTIME) #define HAVE_FTIME - #define ftime(x) _ftime(x) +# if __IBMCPP__ >= 400 + # define ftime(x) _ftime(x) +# endif #endif #include @@ -113,6 +115,26 @@ void wxTimerBase::Notify() (void)m_owner->ProcessEvent(event); } +bool wxTimerBase::Start(int milliseconds, bool oneShot) +{ + if ( IsRunning() ) + { + // not stopping the already running timer might work for some + // platforms (no problems under MSW) but leads to mysterious crashes + // on the others (GTK), so to be on the safe side do it here + Stop(); + } + + if ( milliseconds != -1 ) + { + m_milli = milliseconds; + } + + m_oneShot = oneShot; + + return TRUE; +} + #endif // wxUSE_GUI // ---------------------------------------------------------------------------- @@ -198,7 +220,8 @@ long wxGetLocalTime() // Get UTC time as seconds since 00:00:00, Jan 1st 1970 long wxGetUTCTime() { - struct tm tm, *ptm; + struct tm tm; + struct tm *ptm; time_t t0, t1; // This cannot be made static because mktime can overwrite it