[MPlayer-dev-eng] [PATCH] get_time

Clemens Ladisch clemens at ladisch.de
Mon Sep 13 13:33:29 CEST 2010


Dan Oscarsson wrote:
> sön 2010-09-12 klockan 19:31 +0200 skrev Nicolas George:
> > Le sextidi 26 fructidor, an CCXVIII, Dan Oscarsson a écrit :
> > > A test like time1 < time2 can fail if one of the values have wrapped
> > > around.
> > 
> > But it works if you write it "(unsigned)time2 - (unsigned)time1 < INT_MAX".
> > Or maybe I missed what kind of warp you are talking about.
> 
> Yes, I guess that would work, but that would make the code much more
> difficult to understand.

Then wrap it in a macro/function "time_is_before".


Regards,
Clemens


More information about the MPlayer-dev-eng mailing list