All of
 help / color / mirror / Atom feed
From: Gregor Boirie <>
To: <>
Subject: Re: using monotonic clok for timstamping
Date: Wed, 10 Feb 2016 10:46:04 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 02/09/2016 09:52 PM, Lars-Peter Clausen wrote:
> On 02/09/2016 12:06 PM, Gregor Boirie wrote:
>> To sump up, implementing timestamping clock selection support in IIO
>> should be based on the following principles.
>> Selected timestamping clock is a per-device attribute which the userspace
>> may access through a sysfs file.
>> It must be applicable to both buffered samples and events.
> Just playing out ideas here to make sure we have everything covered, but
> could be there be a setup where you'd want different timestamps for events
> and buffers?
I'm not familiar enough with events to tell.

>> Userspace may choose amongst a subset of available POSIX clocks. A good
>> starting point would be: CLOCK_REALTIME, CLOCK_MONOTONIC,
>> Please delete as appropriate if needed and see clock_gettime(2).
>> One remaining question is : how do we ensure sample and event timestamps
>> consistency with respect to clock changes ? 2 suggestions:
>> * reject the ability to select a new clock as long as an events chardev is
>> opened
>>    or a buffered samples channel is enabled ;
>> * clock may be changed at any time since it could be implemented in an atomic
>>    way (a simple atomic_t can hold an int / clockid_t if I'm no wrong).
> Not sure if we need to prevent it. If somebody changes it during an active
> measurement it is their problem I'd say.
I like this way of keeping it simple. However, wouldn't this make the API
inhomogeneous ? After all, many channel related operations return
-EBUSY while flowing samples...

      parent reply	other threads:[~2016-02-10  9:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 10:55 Gregor Boirie
2016-02-03 11:22 ` Lars-Peter Clausen
2016-02-06 18:33   ` Jonathan Cameron
2016-02-08  9:55     ` Lars-Peter Clausen
2016-02-08 17:15       ` Jonathan Cameron
2016-02-09 11:06         ` Gregor Boirie
2016-02-09 14:19           ` Gregor Boirie
2016-02-09 20:49             ` Jonathan Cameron
2016-02-09 20:52           ` Lars-Peter Clausen
2016-02-09 21:02             ` Jonathan Cameron
2016-02-10  9:46             ` Gregor Boirie [this message]

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:

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

  git send-email \ \ \ \
    --subject='Re: using monotonic clok for timstamping' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.