Re: using monotonic clok for timstamping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/03/2016 11:55 AM, Gregor Boirie wrote:
> Dear  all,
> 
> Our application relies on precise and monotonic timestamping of IMU samples
> (and other sensors).
> I am wondering what reasons / use cases led to the choice of realtime clock
> to implement
> iio_get_time_ns (not to mention time gaps that may be seen after wake up
> from sleep states).

It's more of an oversight than a deliberate design decision. I noticed this
problem as well a while ago and wanted to re-write things to use the
monotonic clock, but then realized that this would be a ABI change so
dropped it and forgot about it again.

> 
> As a dirty hack, I simply rewrote iio_get_time_ns on our platform. But I
> suspect it would be usefull as
> a long term solution, to give userland the ability to choose a particular
> posix clock (realtime, monotonic,
> etc...) on a per device and / or driver basis through a sysfs attribute for
> example.

This is probably the only viable solution while keeping the ABI backwards
compatible.

- Lars

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux