[vlc-devel] [Patch] mtime(), on windows with more than one core

Andre Weber WeberAndre at gmx.de
Wed Jan 30 20:24:56 CET 2008


Hello,

since some time I work and test on a dual core, in my case the detect if the
functions "QueryPerformanceFrequency" are reliable worked - and disabled
them -- to use "QueryPerformanceFrequency" on a dualcore - is currently
not really good working on Windows (blame MS for that, the only option
to get it to work - will be disable powersaving --> like speedstep or Cool and
Quite.)

On my tests with Spdif I had access to one machine also with dual core
where the test failed - and QueryPerformanceCounter was used - with
terrible results - of wrong time measurement. -> each core has its own HPT ...
which may not be in sync, or change there clockrate - according to
powerstate...

So I decided to disable QueryPerformanceFrequency on each computer
with XP, Windows 2000 and Vista - with more than one core, and
use instead the fallback option, where I replace GetTickCount by
timeGetTime -- which has a precision around 5ms (instead 15ms of
GetTickCount) - the precision could be changed -> but this must
done and undone somewhere global (main()?) - the default precision
is 5ms.

Currently I think - we should disable HPT usage in general - because
I think there are also false reports of reliable HPT on single cores
- with enabled speedstep / cool and quite.


Atmo

--
André Weber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtime.diff
Type: text/x-diff
Size: 3221 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080130/61925b73/attachment.diff>


More information about the vlc-devel mailing list