X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c717dd16bc89fbe772d6651328405a12ada797a..4a2d030adfa836f6ada1830c9057170d053bcc64:/src/common/stopwatch.cpp diff --git a/src/common/stopwatch.cpp b/src/common/stopwatch.cpp index f36696dff0..21c522f5d9 100644 --- a/src/common/stopwatch.cpp +++ b/src/common/stopwatch.cpp @@ -8,7 +8,6 @@ // Guillermo Rodriguez rewrote from scratch (Dic/99) // Modified by: // Created: 20.06.2003 (extracted from common/timercmn.cpp) -// RCS-ID: $Id$ // Copyright: (c) 1998-2003 wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -33,7 +32,7 @@ #if wxUSE_STOPWATCH #ifndef WX_PRECOMP - #ifdef __WXMSW__ + #ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" #endif #include "wx/log.h" @@ -51,7 +50,7 @@ namespace { -#ifdef __WXMSW__ +#ifdef __WINDOWS__ struct PerfCounter { @@ -70,7 +69,7 @@ struct PerfCounter bool init; } gs_perfCounter; -#endif // __WXMSW__ +#endif // __WINDOWS__ const int MILLISECONDS_PER_SECOND = 1000; const int MICROSECONDS_PER_MILLISECOND = 1000; @@ -80,7 +79,7 @@ const int MICROSECONDS_PER_SECOND = 1000*1000; void wxStopWatch::DoStart() { -#ifdef __WXMSW__ +#ifdef __WINDOWS__ if ( !gs_perfCounter.init ) { wxCRIT_SECT_LOCKER(lock, gs_perfCounter.cs); @@ -99,19 +98,19 @@ void wxStopWatch::DoStart() gs_perfCounter.init = true; } -#endif // __WXMSW__ +#endif // __WINDOWS__ m_t0 = GetCurrentClockValue(); } wxLongLong wxStopWatch::GetClockFreq() const { -#ifdef __WXMSW__ +#ifdef __WINDOWS__ // Under MSW we use the high resolution performance counter timer which has // its own frequency (usually related to the CPU clock speed). if ( gs_perfCounter.CanBeUsed() ) return gs_perfCounter.freq.QuadPart; -#endif // __WXMSW__ +#endif // __WINDOWS__ #ifdef HAVE_GETTIMEOFDAY // With gettimeofday() we can have nominally microsecond precision and @@ -137,14 +136,14 @@ void wxStopWatch::Start(long t0) wxLongLong wxStopWatch::GetCurrentClockValue() const { -#ifdef __WXMSW__ +#ifdef __WINDOWS__ if ( gs_perfCounter.CanBeUsed() ) { LARGE_INTEGER counter; ::QueryPerformanceCounter(&counter); return counter.QuadPart; } -#endif // __WXMSW__ +#endif // __WINDOWS__ #ifdef HAVE_GETTIMEOFDAY return wxGetUTCTimeUSec();