diff options
author | phk <phk@FreeBSD.org> | 2002-04-26 21:31:44 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-26 21:31:44 +0000 |
commit | d1d55e6cb9412612405c83d273cf677819a841a5 (patch) | |
tree | 2d6cf3e9c14f0c8a30d152f6f10c4cc46d797f25 /sys/kern/kern_tc.c | |
parent | 47e5a75efe42b9d1926080e0a6d1787413891b8d (diff) | |
download | FreeBSD-src-d1d55e6cb9412612405c83d273cf677819a841a5.zip FreeBSD-src-d1d55e6cb9412612405c83d273cf677819a841a5.tar.gz |
Hide the private parts of timecounter from a couple of places that don't
really need to know the gory details.
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index fe07aec..23c85cf 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -312,6 +312,13 @@ tc_setclock(struct timespec *ts) tc_windup(); } +u_int32_t +tc_getfrequency(void) +{ + + return (timecounter->tc_frequency); +} + static void switch_timecounter(struct timecounter *newtc) { @@ -362,10 +369,9 @@ tc_windup(void) */ if (tco->tc_poll_pps) tco->tc_poll_pps(tco); - for (i = tc->tc_offset.sec - tco->tc_offset.sec; i > 0; i--) { - ntp_update_second(tc); /* XXX only needed if xntpd runs */ - tc_setscales(tc); - } + for (i = tc->tc_offset.sec - tco->tc_offset.sec; i > 0; i--) + ntp_update_second(&tc->tc_adjustment, &tc->tc_offset.sec); + tc_setscales(tc); bt = tc->tc_offset; bintime_add(&bt, &boottimebin); |