From: Richard Cochran <richardcochran@gmail.com>
To: "Koehrer Mathias (ETAS/ESW5)" <mathias.koehrer@etas.com>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: CLOCK_REALTIME instead of CLOCK_MONOTONIC for PTP coupled RT_PREEMPT systems?
Date: Thu, 7 Aug 2014 07:44:27 +0200 [thread overview]
Message-ID: <20140807054427.GA4435@netboy> (raw)
In-Reply-To: <4c361c69cd0a4b2690542c1a5bc1c2a1@FE-MBX1012.de.bosch.com>
On Thu, Jul 24, 2014 at 07:36:06AM +0000, Koehrer Mathias (ETAS/ESW5) wrote:
> What speaks against using CLOCK_REALTIME for the real time application?
> Are there any drawbacks?
The only drawback is that, in general, someone else might set the
time. This can happen in three ways.
1. local root user calls settime
2. system boots with large time offset, then learns the correct time
using NTP or PTP, then resets the local clock to match.
3. when using NTP or PTP, the remote root user calls settime
> With our application I can ensure that no manually set of the time occurs.
You also will want to make sure that the application does not start
until case #2 has occurred. Both NTP and PTP provide ways to find out
the synchronization state.
So, if you can control the networked run time environments, then there
is no drawback to using CLOCK_REALTIME.
Thanks,
Richard
prev parent reply other threads:[~2014-08-07 5:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 7:36 CLOCK_REALTIME instead of CLOCK_MONOTONIC for PTP coupled RT_PREEMPT systems? Koehrer Mathias (ETAS/ESW5)
2014-08-07 5:44 ` Richard Cochran [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=20140807054427.GA4435@netboy \
--to=richardcochran@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=mathias.koehrer@etas.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox