> Presumably you could fake something like this by combining output from
> an initial time(), an initial QueryPerformanceCounter() and the
> current QueryPerformanceCounter(). But it makes more sense to
> understand why someone chose to implement time.clock() on Windows the
> way they did -- this seems very broken to me, and I think it should be
> changed.

Yes.  The problem with QPC is that although it has very high resolution, it is 
not precise in the long term.  And GetSystemTimeAsFileTime() is high precision 
in the long term but only updated evey 20ms or so.
In EVE Online we use a combination of the two for high resolution, long term 
precision.  But I'm not happy with the way I'm doing it.  It needs some sort of 
smoothing of course.  I've even played with using Kalman filtering to do it...
The idea is to use the low frequency timer to apply correction coefficients to 
the high frequency timer, yet keep the flow of time smooth (no backwards jumps 
because of corrections.).  An optimal solution has so far eluded me.

Cheers,

K
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to