diff options
author | phk <phk@FreeBSD.org> | 1998-04-08 09:01:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-04-08 09:01:53 +0000 |
commit | c641c2b9ee04fdd1ef8bd2bef473c319d0f83401 (patch) | |
tree | 95a2a4ace7166ebe3475147b1c8dbbba5f37c456 /sys/kern/kern_tc.c | |
parent | 4bc4bc7c1a8513f44d4973b99d18eb307c6f0370 (diff) | |
download | FreeBSD-src-c641c2b9ee04fdd1ef8bd2bef473c319d0f83401.zip FreeBSD-src-c641c2b9ee04fdd1ef8bd2bef473c319d0f83401.tar.gz |
Minor adjustments to the timecounting and proc0.
Mostly Submitted by: bde
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 13195c3..a70ab9d 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -39,7 +39,7 @@ static volatile int print_tci = 1; * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.65 1998/04/05 11:49:34 phk Exp $ + * $Id: kern_clock.c,v 1.66 1998/04/06 08:26:03 phk Exp $ */ #include <sys/param.h> @@ -756,7 +756,7 @@ tco_forward(void) timedelta -= tickdelta; } - if (tc->offset_nano >= 1000000000ULL << 32) { + while (tc->offset_nano >= 1000000000ULL << 32) { tc->offset_nano -= 1000000000ULL << 32; tc->offset_sec++; tc->frequency = tc->tweak->frequency; @@ -771,7 +771,7 @@ tco_forward(void) tc->nanotime.tv_sec = tc->offset_sec + boottime.tv_sec; tc->nanotime.tv_nsec = (tc->offset_nano >> 32) + boottime.tv_usec * 1000; tc->microtime.tv_usec = tc->offset_micro + boottime.tv_usec; - if (tc->nanotime.tv_nsec > 1000000000) { + if (tc->nanotime.tv_nsec >= 1000000000) { tc->nanotime.tv_nsec -= 1000000000; tc->microtime.tv_usec -= 1000000; tc->nanotime.tv_sec++; |