summaryrefslogtreecommitdiff
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-09-09 04:50:34 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-09-09 04:50:34 +0000
commitd2ea918cedb75be5e6368dde0ba9d7311d3e3063 (patch)
treee68aabdd0f144eb32877c24ea75f0e3e3aae3125 /sys/kern/kern_clock.c
parent59ca8d890132d0f76066650ec3dbab654cab211d (diff)
Don't claim a better precision than (1,000,000 / hz) us...
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 1af2428f6d3..0ec0ed779e6 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.12 1996/06/09 03:47:29 briggs Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.13 1996/09/09 04:50:33 tholo Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -129,7 +129,7 @@ int time_status = STA_UNSYNC; /* clock status bits */
long time_offset = 0; /* time offset (us) */
long time_constant = 0; /* pll time constant */
long time_tolerance = MAXFREQ; /* frequency tolerance (scaled ppm) */
-long time_precision = 1; /* clock precision (us) */
+long time_precision; /* clock precision (us) */
long time_maxerror = MAXPHASE; /* maximum error (us) */
long time_esterror = MAXPHASE; /* estimated error (us) */
@@ -317,6 +317,9 @@ initclocks()
psratio = profhz / i;
#ifdef NTP
+ if (time_precision == 0)
+ time_precision = tick;
+
switch (hz) {
case 60:
case 64: