* [Xenomai-help] timestamping of events in a xenomai task?
@ 2011-09-26 9:13 Jens Köhler
2011-09-26 11:47 ` Gilles Chanteperdrix
0 siblings, 1 reply; 2+ messages in thread
From: Jens Köhler @ 2011-09-26 9:13 UTC (permalink / raw)
To: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
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?
Thanks and regards,
Jens
[-- Attachment #2: Type: text/html, Size: 404 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-help] timestamping of events in a xenomai task?
2011-09-26 9:13 [Xenomai-help] timestamping of events in a xenomai task? Jens Köhler
@ 2011-09-26 11:47 ` Gilles Chanteperdrix
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2011-09-26 11:47 UTC (permalink / raw)
To: Jens Köhler; +Cc: xenomai-help
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-26 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 9:13 [Xenomai-help] timestamping of events in a xenomai task? Jens Köhler
2011-09-26 11:47 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.