public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [RFC] Monotonic clock usage in buffer timestamps
Date: Wed, 02 Nov 2011 12:16:51 +0100	[thread overview]
Message-ID: <346e9709d02ee99af76e0d2ccaf698d8@chewa.net> (raw)
In-Reply-To: <20111102105804.GA15491@minime.bse>

On Wed, 2 Nov 2011 11:58:04 +0100, Daniel Glöckner <daniel-gl@gmx.net>

wrote:

>> Converting between the two can be done when making the timestamp but

it's

>> non-trivial at other times and likely isn't supported. I could be

wrong,

>> though. This might lead to e.g. timestamps that are taken before

>> switching

>> to summer time and for which the conversion is done after the switch.

>> This might be a theoretical possibility, but there might be also

>> unfavourable interaction with the NTP.

> 

> Summertime/wintertime is purely a userspace thing. UTC as returned by

> gettimeofday is unaffected by that.



Right, DST is a non-issue.



> NTP AFAIK adjusts the speed of the monotonic clock, so there is a

constant

> delta between wall clock time and clock monotonic



For NTP it depends. Simple NTP, as in ntpdate, warps the wall clock.

Full-blown NTP only adjusts the speed.



> unless there is a leap

> second or someone calls settimeofday. Applications currently using the

> wall clock timestamps should have trouble dealing with that as well.



I can think of at least three other sources of wall clock time, that could

trigger a warp:

 - GPS receiver (TAI),

 - cellular modem (NITZ),

 - and, of course, manual setting.



So if at all possible I'd much prefer monotonic over real timestamps.



-- 

Rémi Denis-Courmont

http://www.remlab.net/

  reply	other threads:[~2011-11-02 11:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 12:24 [RFC] Monotonic clock usage in buffer timestamps Laurent Pinchart
2011-11-01 12:36 ` Rémi Denis-Courmont
2011-11-01 12:49   ` Laurent Pinchart
2011-11-02  9:10     ` Daniel Glöckner
2011-11-02 10:14       ` Sakari Ailus
2011-11-02 10:51         ` Laurent Pinchart
2011-11-02 10:58         ` Daniel Glöckner
2011-11-02 11:16           ` Rémi Denis-Courmont [this message]
2011-11-02 12:47           ` Sakari Ailus
2011-11-02 12:32         ` Sakari Ailus
2011-11-02 10:04 ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=346e9709d02ee99af76e0d2ccaf698d8@chewa.net \
    --to=remi@remlab.net \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox