diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-04-25 09:00:00 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-04-25 09:00:00 +0000 |
| commit | 0bb2226a4d83d04872ceadc4701a79977055f569 (patch) | |
| tree | 920cf45fb320f3bfed45c6593a7bf7cd142d26bb /sys/kern/kern_tc.c | |
| parent | 477f9db33dd40ed08033df3cca7caaeb155d90fe (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_tc.c')
| -rw-r--r-- | sys/kern/kern_tc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 114a5926a0f3..a1b7727d3885 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.92 1999/03/12 21:58:54 phk Exp $ + * $Id: kern_clock.c,v 1.93 1999/04/02 13:57:21 phk Exp $ */ #include "opt_ntp.h" @@ -656,13 +656,19 @@ tco_setscales(struct timecounter *tc) scale = 1000000000LL << 32; scale += tc->tc_adjustment; - scale /= tc->tc_frequency; + scale /= tc->tc_tweak->tc_frequency; tc->tc_scale_micro = scale / 1000; tc->tc_scale_nano_f = scale & 0xffffffff; tc->tc_scale_nano_i = scale >> 32; } void +update_timecounter(struct timecounter *tc) +{ + tco_setscales(tc); +} + +void init_timecounter(struct timecounter *tc) { struct timespec ts1; @@ -670,9 +676,9 @@ init_timecounter(struct timecounter *tc) int i; tc->tc_adjustment = 0; + tc->tc_tweak = tc; tco_setscales(tc); tc->tc_offset_count = tc->tc_get_timecount(tc); - tc->tc_tweak = tc; MALLOC(t1, struct timecounter *, sizeof *t1, M_TIMECOUNTER, M_WAITOK); *t1 = *tc; t2 = t1; |
