Changes for VISAGECPP (use _ftime to avoid clock skew bug)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
aff5d59148
commit
47af912426
@ -53,6 +53,11 @@
|
|||||||
#define HAVE_FTIME
|
#define HAVE_FTIME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__VISAGECPP__) && !defined(HAVE_FTIME)
|
||||||
|
#define HAVE_FTIME
|
||||||
|
#define ftime(x) _ftime(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifndef __WXMAC__
|
#ifndef __WXMAC__
|
||||||
#include <sys/types.h> // for time_t
|
#include <sys/types.h> // for time_t
|
||||||
@ -279,16 +284,8 @@ wxLongLong wxGetLocalTimeMillis()
|
|||||||
|
|
||||||
val *= wxGetLocalTime();
|
val *= wxGetLocalTime();
|
||||||
|
|
||||||
#if defined(__VISAGECPP__)
|
// GRG: This will go soon as all WIN32 seem to have ftime
|
||||||
// If your platform/compiler needs to use two different functions
|
#if defined (__WIN32__)
|
||||||
// to get ms resolution, please do NOT just shut off these warnings,
|
|
||||||
// drop me a line instead at <guille@iies.es>
|
|
||||||
#warning "Possible clock skew bug in wxGetLocalTimeMillis()!"
|
|
||||||
|
|
||||||
DATETIME dt;
|
|
||||||
::DosGetDateTime(&dt);
|
|
||||||
val += (dt.hundredths*10);
|
|
||||||
#elif defined (__WIN32__)
|
|
||||||
// If your platform/compiler needs to use two different functions
|
// If your platform/compiler needs to use two different functions
|
||||||
// to get ms resolution, please do NOT just shut off these warnings,
|
// to get ms resolution, please do NOT just shut off these warnings,
|
||||||
// drop me a line instead at <guille@iies.es>
|
// drop me a line instead at <guille@iies.es>
|
||||||
|
Loading…
Reference in New Issue
Block a user