diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-02-15 13:50:12 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1998-02-15 13:50:12 +0000 |
| commit | 9ada5a50f3ded9c99a29a29c5db9323d294eeff6 (patch) | |
| tree | 186b9ff0d74f8b3565d7457fdd96814ae16f2918 /sys/kern/kern_ntptime.c | |
| parent | dc548d5d936604e9a5d2e1d6cce19238f903c107 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_ntptime.c')
| -rw-r--r-- | sys/kern/kern_ntptime.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index f5c353ccb126..102e6500dcb5 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -409,6 +409,7 @@ ntp_update_second(long *newsec) break; } } + static int ntp_sysctl SYSCTL_HANDLER_ARGS { @@ -417,24 +418,7 @@ ntp_sysctl SYSCTL_HANDLER_ARGS int s; s = splclock(); -#ifdef EXT_CLOCK - /* - * The microtime() external clock routine returns a - * status code. If less than zero, we declare an error - * in the clock status word and return the kernel - * (software) time variable. While there are other - * places that call microtime(), this is the only place - * that matters from an application point of view. - */ - if (microtime(&atv) < 0) { - time_status |= STA_CLOCKERR; - ntv.time = time; - } else { - time_status &= ~STA_CLOCKERR; - } -#else /* EXT_CLOCK */ microtime(&atv); -#endif /* EXT_CLOCK */ ntv.time = atv; ntv.maxerror = time_maxerror; ntv.esterror = time_esterror; @@ -594,7 +578,7 @@ ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap) #ifdef PPS_SYNC -/* We need this ugly monster twice, so lets macroize it... */ +/* We need this ugly monster twice, so let's macroize it. */ #define MEDIAN3X(a, m, s, i1, i2, i3) \ do { \ @@ -689,9 +673,7 @@ hardpps(tvp, p_usec) pps_tf[2] = pps_tf[1]; pps_tf[1] = pps_tf[0]; pps_tf[0] = u_usec; - MEDIAN3(pps_tf, pps_offset, v_usec); - if (v_usec > MAXTIME) pps_jitcnt++; v_usec = (v_usec << PPS_AVG) - pps_jitter; @@ -774,7 +756,6 @@ hardpps(tvp, p_usec) pps_ff[2] = pps_ff[1]; pps_ff[1] = pps_ff[0]; pps_ff[0] = v_usec; - MEDIAN3(pps_ff, u_usec, v_usec); /* @@ -823,4 +804,5 @@ hardpps(tvp, p_usec) } else pps_intcnt++; } + #endif /* PPS_SYNC */ |
