X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03e11df5470fd64d9d9a669d0b50b84c2d714736..c9cdd31d8176e8fc5abe07feafedd16043d63de1:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index 51432d1610..6a494be5ac 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -22,7 +22,7 @@ #include "wx/longlong.h" #include "wx/event.h" -#if wxUSE_GUI +#if wxUSE_GUI && wxUSE_TIMER // ---------------------------------------------------------------------------- // wxTimer @@ -178,12 +178,14 @@ typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); #define EVT_TIMER(id, func) \ DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL), -#endif // wxUSE_GUI +#endif // wxUSE_GUI && wxUSE_TIMER // ---------------------------------------------------------------------------- // wxStopWatch: measure time intervals with up to 1ms resolution // ---------------------------------------------------------------------------- +#if wxUSE_STOPWATCH + class WXDLLEXPORT wxStopWatch { public: @@ -205,6 +207,9 @@ private: long m_pause; // the time of the last Pause() or 0 }; +#endif // wxUSE_STOPWATCH + +#if wxUSE_LONGLONG // Starts a global timer // -- DEPRECATED: use wxStopWatch instead @@ -214,6 +219,8 @@ void WXDLLEXPORT wxStartTimer(); // -- DEPRECATED: use wxStopWatch instead long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); +#endif // wxUSE_LONGLONG + // ---------------------------------------------------------------------------- // global time functions // ---------------------------------------------------------------------------- @@ -224,8 +231,10 @@ extern long WXDLLEXPORT wxGetLocalTime(); // Get number of seconds since GMT 00:00:00, Jan 1st 1970. extern long WXDLLEXPORT wxGetUTCTime(); +#if wxUSE_LONGLONG // Get number of milliseconds since local time 00:00:00 Jan 1st 1970 extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis(); +#endif // wxUSE_LONGLONG #define wxGetCurrentTime() wxGetLocalTime()