X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8df6de970d7b4e4bc1f8701d1f3ab1adedde8f00..64f4500a4a6905623685e67efc65b0d856aff393:/src/common/stopwatch.cpp?ds=sidebyside diff --git a/src/common/stopwatch.cpp b/src/common/stopwatch.cpp index 21cd161679..1a6fcd064b 100644 --- a/src/common/stopwatch.cpp +++ b/src/common/stopwatch.cpp @@ -33,18 +33,18 @@ #include "wx/log.h" #endif //WX_PRECOMP -#include "wx/timer.h" #include "wx/longlong.h" +#include "wx/stopwatch.h" // ---------------------------------------------------------------------------- // System headers // ---------------------------------------------------------------------------- #if defined(__WIN32__) - #include + #include "wx/msw/wrapwin.h" #endif -#if defined(__WIN32__) && !defined(HAVE_FTIME) && !defined(__MWERKS__) +#if defined(__WIN32__) && !defined(HAVE_FTIME) && !defined(__MWERKS__) && !defined(__WXWINCE__) #define HAVE_FTIME #endif @@ -60,8 +60,14 @@ # undef HAVE_GETTIMEOFDAY #endif +#ifndef __WXWINCE__ #include -#ifndef __WXMAC__ +#else +#include "wx/msw/private.h" +#include "wx/msw/wince/time.h" +#endif + +#if !defined(__WXMAC__) && !defined(__WXWINCE__) #include // for time_t #endif @@ -244,7 +250,7 @@ wxLongLong wxGetLocalTimeMillis() // If possible, use a function which avoids conversions from // broken-up time structures to milliseconds -#if defined(__WXMSW__) && defined(__MWERKS__) +#if defined(__WXMSW__) && (defined(__WINE__) || defined(__MWERKS__)) // This should probably be the way all WXMSW compilers should do it // Go direct to the OS for time @@ -313,11 +319,16 @@ wxLongLong wxGetLocalTimeMillis() val *= wxGetLocalTime(); // GRG: This will go soon as all WIN32 seem to have ftime +// JACS: unfortunately not. WinCE doesn't have it. #if defined (__WIN32__) // If your platform/compiler needs to use two different functions // to get ms resolution, please do NOT just shut off these warnings, // drop me a line instead at + + // FIXME +#ifndef __WXWINCE__ #warning "Possible clock skew bug in wxGetLocalTimeMillis()!" +#endif SYSTEMTIME st; ::GetLocalTime(&st);