[Xenomai] q: userland timestamps which match rt_timer_read()

Michael Haberler mail17 at mah.priv.at
Mon Apr 28 17:10:35 CEST 2014



> Am 27.04.2014 um 19:28 schrieb Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>:
> 
>> On 04/27/2014 05:29 PM, Michael Haberler wrote:
>> I need to create ns-resolution timestamps from RT (using
>> rt_timer_read() - no surprises) and from normal userland programs
>> 
>> the latter binaries should be Xenomai-unaware if possible - is there
>> a normal Linux API which reads the same timestamp source as
>> rt_timer_read()?
>> 
>> eg: clock_gettime(CLOCK_xxxx)?
> 
> No, xenomai clock and linux clock generally are not synchronized. If you
> need only timestamps though, you can access linux realtime clock from
> xenomai program (wihout a switch to secondary mode) by using xenomai
> posix skin clock_gettime(CLOCK_HOST_REALTIME). This clock can not be
> used for timers (or timeouts) though.

great - thanks, exactly what I was looking for!

- Michael

> 
> -- 
>                                                                Gilles.




More information about the Xenomai mailing list