[MPlayer-dev-eng] [PATCH] get_time

Dan Oscarsson Dan.Oscarsson at tieto.com
Wed Sep 15 18:42:18 CEST 2010


tis 2010-09-14 klockan 20:33 +0200 skrev Reimar Döffinger:
> > What I meant was that what is wrong in having av version of
> > GetTimer that returns the result using 64 bits so that time does not
> > need to be truncated?
> 
> How else can I say this.
> You may not be able to implement a 64 bit GetTimer functions efficiently
> on some systems.
> Or to say it differently: adding such a thing might be a portability issue.
> So there must be a better reason that "it simplifies some hypothetical
> time checks that we don't use and probably wouldn't be working well anyway".

Well, from what I can see uint64_t is used in several places so I guess
most systems mplayer is on can handle that.

The only implementation difference between the current GetTimer and my
64-bit version is that the result is returned in uint64_t instead of
truncated to unsigned int. So the only difference in efficiency is that
in my version you need to do 64-bit multiply. While 64-bit integers may
be slower on some systems I cannot find that it is a big portability
issue as 64-bit integers are used in many places already.

   Dan



More information about the MPlayer-dev-eng mailing list