On Mon, Feb 4, 2008 at 4:14 PM, Axel Beierlein <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  which corresponding functions do i have to use when i try to get the
>  correct timediff between two events. Especially i get an timestamp with
>  every CAN Message (wich is implemented with rtdm_clock_read())and on the
>  other side i get a timestamp in my Userspace application with
>  rt_timer_tsc(). Are they are running at the same base so that i can use
>  the difference of both returned values of the functions?

rt_timer_read() corresponds to rtdm_clock_read(), but rt_timer_read()
returns the date as a count of clock ticks whereas rtdm_clock_read()
returns the date as a count of nanoseconds. So, if you are running in
periodic mode, you should compare CAN message timestamps with
rt_timer_ticks2ns(rt_timer_read()), if you are running in aperiodic
mode, rt_timer_ticks2ns simply returns the same value, so you can
directly compare the value returned by rtdm_clock_read() and
rt_timer_read().

-- 
                                               Gilles Chanteperdrix

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to