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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux