Add more NTP override code.

This commit is contained in:
W. Eric Norum
2007-10-08 14:57:09 +00:00
parent 5790d231c2
commit 987d3295da
+5
View File
@@ -69,8 +69,13 @@ static void syncNTP(void)
while(1) {
double diffTime;
extern int rtems_bsdnet_get_ntp(int, int(*)(), struct timespec *);
if(!firstTime)epicsThreadSleep(iocClockSyncRate);
firstTime = 0;
if(piocClockPvt->getCurrent != iocClockGetCurrent) {
errlogPrintf("syncNTP: NTP client terminating.\n");
return;
}
status = rtems_bsdnet_get_ntp(-1, NULL, &Currtime);
if(status) {
++nConsecutiveBad;