[Python-checkins] r42303 - python/trunk/Modules/_lsprof.c
armin.rigo
python-checkins at python.org
Fri Feb 10 14:19:53 CET 2006
Author: armin.rigo
Date: Fri Feb 10 14:19:53 2006
New Revision: 42303
Modified:
python/trunk/Modules/_lsprof.c
Log:
The default timer unit was incorrectly measured in milliseconds instead
of seconds, producing numbers 1000 times too large. It would be nice to
write a test for this, but how... (thanks mwh)
Modified: python/trunk/Modules/_lsprof.c
==============================================================================
--- python/trunk/Modules/_lsprof.c (original)
+++ python/trunk/Modules/_lsprof.c Fri Feb 10 14:19:53 2006
@@ -27,9 +27,9 @@
{
LARGE_INTEGER li;
if (QueryPerformanceFrequency(&li))
- return 1000.0 / li.QuadPart;
+ return 1.0 / li.QuadPart;
else
- return 0.001; /* unlikely */
+ return 0.000001; /* unlikely */
}
#else /* !MS_WINDOWS */
@@ -63,7 +63,7 @@
static double
hpTimerUnit(void)
{
- return 0.001;
+ return 0.000001;
}
#endif /* MS_WINDOWS */
More information about the Python-checkins
mailing list