On 07/19/2011 04:24 PM, Philip Ha wrote:
> Dear all,
>
> I am running a serial port test in xenomai (xenomai-2.5.5.2) using 16550A
> driver.
> In my program, I am calling
>
> rt_dev_ioctl(dev_id, RTSER_RTIOC_WAIT_EVENT, & rx_event);
>
> when an event happens, I use clock_gettime(CLOCK_MONOTONIC, & curr_time)
> to get the current time. The program runs continuosly in a while loop. In
> this way, I
> measure the elapsed time between the previous and current events.
Hi,
we do not have enough details here, if you are compiling for the native
skin, the call to clock_gettime is linux clock_gettime, so, can not
really be relied upon in a thread which you with to remain in primary
mode. You should use rt_timer_read.
If you are compiling for the posix skin, you do not give us enough
information to even begin understanding the issue you have .
Regards.
--
Gilles.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help