[MPlayer-dev-eng] Major sleep() performance issue

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 10 17:24:05 CET 2005


Hi,
On Thu, Feb 10, 2005 at 05:07:55PM +0100, Sascha Sommer wrote:
> > Another possible solution would be to modify the Darwin implementation
> > of usec_sleep to treat values <10000 as 10000, but it seems to me that
> > this is a mistake; the greater accuracy of the sleep timer should be
> > leveraged, not ignored.  (BTW - It seems that the Win32 port had a
> > similar problem since it uses a guard like this.)
> >
> 
> The problem on windows is not the to high accuracy, but the issue that 
> Sleep(0) most of the time slept a lot longer than Sleep(1).

IMHO that if(..) should be removed and usec_sleep always be called with
the wanted value - if neccessary it should be modified in osdep if any
os needs special hacks.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list