[MPlayer-dev-eng] [PATCH] get_time
Reimar.Doeffinger at gmx.de
Tue Sep 14 20:33:03 CEST 2010
On Tue, Sep 14, 2010 at 12:59:28PM +0200, Dan Oscarsson wrote:
> mån 2010-09-13 klockan 21:53 +0200 skrev Reimar Döffinger:
> > On Mon, Sep 13, 2010 at 09:38:11PM +0200, Dan Oscarsson wrote:
> > > Well, my get_time calls same system call that GetTimer does.
> > > The only difference is that GetTimer truncates the result to 32 bits.
> > >
> > > So why is there a GetTimer? It has the same precision as my get_time and
> > > the same faults. The only difference is that it truncates the result to
> > > 32 bits. We could just let GetTimer return the full 62 bits instead.
> > And what about a system where it would not be the "full 62 bits" but
> > instead it would be 36 bits?
> > Have fun trying to fix that up to create a value that won't wrap around
> > at the most inconvenient time.
> Sorry, I meant 64 bits. Probably my fingers remembered 32 and get a 2
> last. 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".
More information about the MPlayer-dev-eng