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

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Sun Apr 27 19:28:43 CEST 2014


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.

-- 
                                                                Gilles.




More information about the Xenomai mailing list