[vlc-devel] [RFC] revert Win32: always use the performance timers
fenrir at elivagar.org
Fri Dec 10 00:18:04 CET 2010
On Thu, Dec 09, 2010 at 11:06:12PM +0100, Rémi Denis-Courmont wrote:
> On Thu, 9 Dec 2010 09:24:48 +0100, XilasZ <xilasz at gmail.com> wrote:
> > Would it be possible to use one timer for amd users, and the other one
> > intel users ?
> Are we sure the problem only affects AMD users? Do we have a reliably way
> to check the CPU vendor? CPUID?
> Otherwise, there's GetSystemTime() running at 1 kHz, or
> GetSystemTimeAsFileTime() at 10 MHz (not sure if it is converted from 1 kHz
> though). But I guess they will explode if the user or the NTP service
> adjusts the clock.
Maybe a possible workaround would be to look for jump back, and if it
happens, dynamically switch to timeGetTime(). QueryPerformanceCounter()
should jump back only when it is unreliable. We can also look for large
forward jump by monitoring GetTickCount() (which seems to be very fast to
read but has a poor resolution).
If no one has a better idea, I can try a patch, if we have testers for
both cases (ie the one for which the newer version has fixed the issue
and the one for which it created the issue).
More information about the vlc-devel