logging module -- better timestamp accuracy on Windows

Brian Curtin brian.curtin at gmail.com
Wed Feb 16 14:47:25 EST 2011


On Wed, Feb 16, 2011 at 12:23, benhoyt <benhoyt at gmail.com> wrote:

>
> > AFAIK, the Windows performance counter has long-term accuracy issues,
> > so neither is perfect. Preferably we should have a timer with the long-
> > term accuracy of time.time and the short-term accuracy of time.clock.
>
> Thanks for the tip -- yes, I hadn't thought about that, but you're right,
> QueryPerformanceCounter (and hence time.clock) veers away from the system
> time, and it's non-trivial to fix. See also:
>
> http://msdn.microsoft.com/en-us/magazine/cc163996.aspx


This is what http://pypi.python.org/pypi/timer uses, although it doesn't go
as far as using the final result of the article, but an implementation from
Figure 2, which was "Good Enough" (TM).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110216/b135c70f/attachment.html>


More information about the Python-list mailing list