+2000-05-16 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp_stdlib.h:
+ * libntp/systime.c (adj_systime):
+ * ntpd/ntp_loopfilter.c (loop_config):
+ * ntpd/ntp_util.c (stats_config):
+ * ports/winnt/ntpd/nt_clockstuff.c (adj_systime):
+ MAXFREQ -> MAX_FREQ
+ * include/ntp_proto.h: Define MAX_FREQ
+
2000-05-15 Harlan Stenn <stenn@whimsy.udel.edu>
* include/ntp_stdlib.h:
#define CLOCK_SGATE 10. /* popcorn spike gate */
#define BURST_INTERVAL1 4 /* first interburst interval (log2) */
#define BURST_INTERVAL2 1 /* succeeding interburst intervals (log2) */
-
+
/*
* Operations for jitter (variance) calculations (these use doubles).
*
#include <config.h>
#endif
+#define MAX_FREQ 500e-6
+
#endif /* __ntp_proto_h */
# include <utmpx.h>
#endif /* HAVE_UTMPX_H */
+#include "ntp_proto.h" /* for MAX_FREQ */
#include "ntp_machine.h"
#include "ntp_fp.h"
#include "ntp_syslog.h"
int systime_10ms_ticks = 0; /* adj sysclock in 10ms increments */
-#define MAXFREQ 500e-6
-
/*
* These routines (init_systime, get_systime, step_systime, adj_systime)
* implement an interface between the (more or less) system independent
}
} else
#endif
- if (dtemp > MAXFREQ)
- dtemp = MAXFREQ;
+ if (dtemp > MAX_FREQ)
+ dtemp = MAX_FREQ;
dtemp = dtemp * 1e6 + .5;
*/
etemp = clock_frequency + flladj + plladj;
drift_comp += etemp;
- if (drift_comp > MAXFREQ)
- drift_comp = MAXFREQ;
- else if (drift_comp <= -MAXFREQ)
- drift_comp = -MAXFREQ;
+ if (drift_comp > MAX_FREQ)
+ drift_comp = MAX_FREQ;
+ else if (drift_comp <= -MAX_FREQ)
+ drift_comp = -MAX_FREQ;
dtemp = SQUARE(clock_stability);
etemp = SQUARE(etemp) - dtemp;
clock_stability = SQRT(dtemp + etemp / CLOCK_AVG);
*/
rstclock(S_FSET);
drift_comp = freq;
- if (drift_comp > MAXFREQ)
- drift_comp = MAXFREQ;
- if (drift_comp < -MAXFREQ)
- drift_comp = -MAXFREQ;
+ if (drift_comp > MAX_FREQ)
+ drift_comp = MAX_FREQ;
+ if (drift_comp < -MAX_FREQ)
+ drift_comp = -MAX_FREQ;
#ifdef KERNEL_PLL
/*
* If the phase-lock code is implemented in the kernel,
}
(void) fclose(fp);
if ( !finite(old_drift)
- || (fabs(old_drift) > (MAXFREQ * 1e6))) {
+ || (fabs(old_drift) > (MAX_FREQ * 1e6))) {
msyslog(LOG_ERR, "invalid frequency (%f) in %s",
old_drift, stats_drift_file);
exit(1);
dtemp = -dtemp;
}
- if (dtemp > MAXFREQ)
- dtemp = MAXFREQ;
+ if (dtemp > MAX_FREQ)
+ dtemp = MAX_FREQ;
dtemp = dtemp * 1e6;