Thread (2 messages) 2 messages, 2 authors, 2014-08-07

Re: CLOCK_REALTIME instead of CLOCK_MONOTONIC for PTP coupled RT_PREEMPT systems?

From: Richard Cochran <richardcochran@gmail.com>
Date: 2014-08-07 05:44:38

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help