Hi all,
we found a problem when synchronizing Time on RTEMS targets
with the new NTP-TimeProvider in Release 3.14.10.
NTPTimeSync() writes the NTP-time to the internal buffer only,
if IOC-time is behind NTP-time. Since steps backwards in time
should be avoided, the ticksToSkip-counter is incremented in the
other case and the new NTP-time is disregarded.
If IOC-Time is constantly faster then NTP-Time, the ticksToSkip-
counter increases over the time and IOC-time is never adjusted.
This has the effect, that every minute IOC-Time stops for an
increasing period of time, before jumping back to its original time.
Since VxWorks targets use the same code, I presume they are affected too.
Attached is a patch to set the IOC-time in all cases.
Jens
--- base-3.14.10/src/libCom/osi/osiNTPTime.c 2008-09-15 23:26:33.000000000 +0200
+++ base-3.14.10-1/src/libCom/osi/osiNTPTime.c 2008-11-28 12:57:46.000000000 +0100
@@ -181,11 +181,11 @@
epicsMutexMustLock(NTPTimePvt.lock);
diff = epicsTimeDiffInSeconds(&timeNow, &NTPTimePvt.clockTime);
if (diff >= 0.0) {
- NTPTimePvt.clockTime = timeNow;
NTPTimePvt.ticksToSkip = 0;
} else { /* dont go back in time */
NTPTimePvt.ticksToSkip = -diff * NTPTimePvt.ticksPerSecond;
}
+ NTPTimePvt.clockTime = timeNow;
NTPTimePvt.clockTick = tickNow;
NTPTimePvt.synchronized = 1;
epicsMutexUnlock(NTPTimePvt.lock);
- Replies:
- Re: NTP-Time on RTEMS(vxWorks) Problem Andrew Johnson
- Navigate by Date:
- Prev:
RE: nidaqmxbase synapps module Pedersen, UK (Ulrik)
- Next:
Re: USE of CA lib: problem using ca_array_put_callback with strings haquin
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: nidaqmxbase synapps module Pedersen, UK (Ulrik)
- Next:
Re: NTP-Time on RTEMS(vxWorks) Problem Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|