All of lore.kernel.org
 help / color / mirror / Atom feed
From: nourry@domain.hid
To: xenomai@xenomai.org
Subject: [Xenomai-help] rt_read_timer value
Date: Tue, 08 Jul 2008 16:05:59 +0200	[thread overview]
Message-ID: <1215525959.487374472c1bc@domain.hid> (raw)

Hi,

i try to make a little program that just records time reaction : a picture
appears and we must press a key. Time between image appeared and keypress is
recorded.

For that, i use rt_time_read() in aperiodic mode (since if we don't specify
rt_task_set_periodic(), aperiodic mode is default, that's right ?).

It seems working until a little bit more 2 seconds, but after that, value
returned is negative and decreasing, while it was positive and increasing (weird
because i've read that in aperiodic mode it should be decreasing all the time).

Moreover, i believe remember that while beginning this program, time was always
decreasing, like real-time task were affected by the rest of the program.

I must record time until 5 seconds after image appeared, and this problem
doesn't ease the task.

I must have made a mistake, can someone help me ?

Another little question, which functions, librairies, calls in one word can we
make in real-time tasks without breaking it ? I want to use event detection from
SDL library to catch keypress, there's a function that polls for events (for the
moment i use kbhit). It doesn't seems to increase latency in an endless loop. I
must keep latency under 1 ms since goal is to measure time reaction with
accuracy.


Thanks to all,
Antoine


             reply	other threads:[~2008-07-08 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 14:05 nourry [this message]
2008-07-08 18:48 ` [Xenomai-help] rt_read_timer value Gilles Chanteperdrix

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=1215525959.487374472c1bc@domain.hid \
    --to=nourry@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.