struct tm *tm = NULL;
time_t tstamp;
+#ifdef STA_NANO
+ ntv.modes = MOD_BITS | MOD_NANO;
+#else /* STA_NANO */
ntv.modes = MOD_BITS;
+#endif /* STA_NANO */
if (clock_offset < 0)
dtemp = -.5;
else
printf(
"local_clock: leap %d status %x date %d/%d\n",
leap_next, ntv.status,
- tm->tm_mon + 1, tm->tm_mday);
+ tm->tm_mon + 1,
+ tm->tm_mday);
#endif
}
#ifdef KERNEL_PLL
/*
* Assume the kernel supports the ntp_adjtime() syscall.
- * If that syscall works, initialize the kernel
- * variables. Otherwise, continue leaving no harm
+ * If that syscall works, initialize the kernel time
+ * variables. Otherwise, continue leaving no harm
* behind. While at it, ask to set nanosecond mode. If
* the kernel agrees, rejoice; othewise, it does only
* microseconds.
#endif /* SIGSYS */
/*
- * Save the result status and light up nanoseconds
- * and/or an external clock if available.
+ * Save the result status and light up an external clock
+ * if available.
*/
pll_status = ntv.status;
if (pll_control) {
#define MAXCLP 100 /* max clips above reference per s */
#define MAXERR 10 /* max data bit errors in minute */
#define MAXSNR 40. /* max SNR reference */
-#define MAXFREQ 1. /* max frequency tolerance (125 PPM) */
+#define MAXFREQ 1.5 /* max frequency tolerance (187 PPM) */
#define PI 3.1415926535 /* the real thing */
#define DATCYC 170 /* data filter cycles */
#define DATSIZ (DATCYC * MS) /* data filter size */