summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/timemodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 444b739..283ab5f 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -175,7 +175,8 @@ time_clock(PyObject *self, PyObject *unused)
if (!QueryPerformanceFrequency(&freq) || freq.QuadPart == 0) {
/* Unlikely to happen - this works on all intel
machines at least! Revert to clock() */
- return PyFloat_FromDouble(clock());
+ return PyFloat_FromDouble(((double)clock()) /
+ CLOCKS_PER_SEC);
}
divisor = (double)freq.QuadPart;
}