summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-06-29 20:56:28 (GMT)
committerFred Drake <fdrake@acm.org>2000-06-29 20:56:28 (GMT)
commitdfb4ebda24c1393888779357a4c9bd5bf7e4eaee (patch)
tree1488e6f4aa2d991d1a6478025ff9e3f97c296dc1
parenta3f6e91307fa45c5eb88c3dd7c573ba5ad7df199 (diff)
downloadcpython-dfb4ebda24c1393888779357a4c9bd5bf7e4eaee.zip
cpython-dfb4ebda24c1393888779357a4c9bd5bf7e4eaee.tar.gz
cpython-dfb4ebda24c1393888779357a4c9bd5bf7e4eaee.tar.bz2
Trent Mick <trentm@activestate.com>:
Mark Hammond provided (a long time ago) a better Win32 specific time_clock implementation in timemodule.c. The library for this implementation does not exist on Win64 (yet, at least). This patch makes Win64 fall back on the system's clock() function for time_clock(). This closes SourceForge patch #100512.
-rw-r--r--Modules/timemodule.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 2644e72..fa7a635 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -89,11 +89,12 @@ extern int ftime();
#endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ || __QNX__ */
-#ifdef MS_WIN32
-/* Win32 has better clock replacement */
+#if defined(MS_WIN32) && !defined(MS_WIN64)
+/* Win32 has better clock replacement
+ XXX Win64 does not yet, but might when the platform matures. */
#include <largeint.h>
#undef HAVE_CLOCK /* We have our own version down below */
-#endif /* MS_WIN32 */
+#endif /* MS_WIN32 && !MS_WIN64 */
#if defined(PYCC_VACPP)
#include <sys/time.h>
@@ -190,7 +191,7 @@ time_clock(self, args)
}
#endif /* HAVE_CLOCK */
-#ifdef MS_WIN32
+#if defined(MS_WIN32) && !defined(MS_WIN64)
/* Due to Mark Hammond */
static PyObject *
time_clock(self, args)
@@ -226,7 +227,7 @@ time_clock(self, args)
}
#define HAVE_CLOCK /* So it gets included in the methods */
-#endif /* MS_WIN32 */
+#endif /* MS_WIN32 && !MS_WIN64 */
#ifdef HAVE_CLOCK
static char clock_doc[] =