On 09/26/2011 11:13 AM, Jens Köhler wrote:
> Hello,
>
> I have a computer where time is synchronized by ntp. In a xenomai task I
> like to time stamp external events. What is best way to read linux system
> time in a Xenomai task?
>
> Does function *int ftime(struct timeb ***tp**);* works?
ftime documentation says:
This function is obsolete. Don't use it. If the time in seconds suf‐
fices, time(2) can be used; gettimeofday(2) gives microseconds;
clock_gettime(2) gives nanoseconds but is not as widely available.
In order to solve this particular issue, a new clock was introduced in
Xenomai 2.6.0: CLOCK_HOST_REALTIME to be used with Xenomai posix skin
clock_gettime service. It requires a compatible I-pipe patch, currently
only available for x86 and ARM. Note that CLOCK_HOST_REALTIME can only
be used for timestamping, not for timers.
Xenomai 2.6.0 was not yet released, but you can try 2.6.0-rc3 in the
mean time.
--
Gilles.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help