[MPlayer-dev-eng] [PATCH] gettimeofday() can go backwards

Jonas Jensen jbj at knef.dk
Sun Nov 23 18:35:24 CET 2003


On my IBM Thinkpad, gettimeofday() sometimes goes backwards, making
mplayer's status display go crazy. This one-liner patch workarounds this
in the GetRelativeTime() function for Linux by simply ensuring that the
returned value will always be at least zero.

I have not implemented the fix for other platforms because I don't know
whether it is actually a problem there. Perhaps it is already worked
around in the kernel code on some platforms.

-- 
Jonas Jensen <jbj at knef.dk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-relative_time.patch
Type: text/x-patch
Size: 378 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031123/817c7631/attachment.bin>


More information about the MPlayer-dev-eng mailing list