diff options
author | wollman <wollman@FreeBSD.org> | 1995-10-12 20:35:01 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-10-12 20:35:01 +0000 |
commit | fab8249e23e33d2dccce4d67cf895dbfbd79e733 (patch) | |
tree | a52c7000a9c5f146232d7840b8530b7733a8a732 | |
parent | 4afe99dda1ec1050df5757c66a91e642bb0718d4 (diff) | |
download | FreeBSD-src-fab8249e23e33d2dccce4d67cf895dbfbd79e733.zip FreeBSD-src-fab8249e23e33d2dccce4d67cf895dbfbd79e733.tar.gz |
Improve clock accuracy by accounting for late/missed clock interrupts
if the hardware supports it.
-rw-r--r-- | sys/kern/kern_clock.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_tc.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_timeout.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index ede7b6d..1b617fa 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.15 1995/08/28 09:18:43 julian Exp $ + * $Id: kern_clock.c,v 1.16 1995/09/09 18:10:01 davidg Exp $ */ /* Portions of this software are covered by the following: */ @@ -477,9 +477,9 @@ hardclock(frame) long ltemp; if (timedelta == 0) { - time_update = tick; + time_update = CPU_THISTICKLEN(tick); } else { - time_update = tick + tickdelta; + time_update = CPU_THISTICKLEN(tick) + tickdelta; timedelta -= tickdelta; } BUMPTIME(&mono_time, time_update); diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index ede7b6d..1b617fa 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.15 1995/08/28 09:18:43 julian Exp $ + * $Id: kern_clock.c,v 1.16 1995/09/09 18:10:01 davidg Exp $ */ /* Portions of this software are covered by the following: */ @@ -477,9 +477,9 @@ hardclock(frame) long ltemp; if (timedelta == 0) { - time_update = tick; + time_update = CPU_THISTICKLEN(tick); } else { - time_update = tick + tickdelta; + time_update = CPU_THISTICKLEN(tick) + tickdelta; timedelta -= tickdelta; } BUMPTIME(&mono_time, time_update); diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index ede7b6d..1b617fa 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.15 1995/08/28 09:18:43 julian Exp $ + * $Id: kern_clock.c,v 1.16 1995/09/09 18:10:01 davidg Exp $ */ /* Portions of this software are covered by the following: */ @@ -477,9 +477,9 @@ hardclock(frame) long ltemp; if (timedelta == 0) { - time_update = tick; + time_update = CPU_THISTICKLEN(tick); } else { - time_update = tick + tickdelta; + time_update = CPU_THISTICKLEN(tick) + tickdelta; timedelta -= tickdelta; } BUMPTIME(&mono_time, time_update); |