[FFmpeg-devel] [PATCH] Use monotonic clock for measuringreltime.
Don Moir
donmoir at comcast.net
Wed Apr 2 18:46:56 CEST 2014
----- Original Message -----
From: "Reimar Döffinger" <Reimar.Doeffinger at gmx.de>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
Sent: Wednesday, April 02, 2014 12:46 PM
Subject: Re: [FFmpeg-devel] [PATCH] Use monotonic clock for measuringreltime.
> On 02.04.2014, at 18:18, "Don Moir" <donmoir at comcast.net> wrote:
>> Le tridi 13 germinal, an CCXXII, Don Moir a écrit :
>>>> The wall time can change by a second or seconds forward or backward
>>>> depending on automated clock updates and user setting.
>>
>>> They are bogus settings. Modern operating systems can smooth the correction
>>> over a period of time to update the clock by a small amount.
>>
>> Reality is it happens.
>
> As mentioned other things happen as well, for example the monotonic clock not being affected by these changes, which if they are
> corrections is not necessarily better.
> Plus, I don't think you quite finished why it makes it unsuitable.
> Even with those clock updates it doesn't make it worse than TS timestamps (though I admit being worse would be quite an
> achievement).
> Though I wasn't really arguing against using it (at least optionally), my main point is I just think the underlying issues (if
> there are any) need to be fixed either way.
>
>>>> Can change during daylight savings time switch over by an hour as well.
>>
>>> Wrong.
>>
>> Why is that?
>
> Because only the local time changes, not the system time.
> Windows (though I think only old versions) demonstrate that you can have both the same, but it also demonstrates that it is a
> stupid idea that doesn't work properly even after adding hacks on top of hacks to make it somewhat work.
Not to big a deal because it is somewhat rare, but the time can fluctuate like I said on windows at least with the use of
GetSystemTimeAsFileTime which is what av_gettime maps to under windows. Don't know for linux.
The resolution of GetSystemTimeAsFileTime is 15ms and work arounds are not that elegant.
More information about the ffmpeg-devel
mailing list