X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47af912426dcd738f24063fa0952b20682239cdf..4a45223c970eabf6ba66347129627775935c90b3:/src/common/timercmn.cpp diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index e2aea3bb67..e90b5fd4ad 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 // ----------------------------------------------------------------------------