All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Jens Köhler" <jenskxxx@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] timestamping of events in a xenomai task?
Date: Mon, 26 Sep 2011 13:47:29 +0200	[thread overview]
Message-ID: <4E806651.7040204@domain.hid> (raw)
In-Reply-To: <CAL7_A_VgBKS_dkzSTSE8M8d1TZQ+DLGoM-M7uM3OD4MW=aff9A@mail.gmail.com>

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.



      reply	other threads:[~2011-09-26 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E806651.7040204@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jenskxxx@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.