summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-05-30 10:34:01 +0000
committerphk <phk@FreeBSD.org>2002-05-30 10:34:01 +0000
commit559ad519498a0936f44bb223aeb010c416b05a3f (patch)
treeb9a0175ad273edc45e3815cdc5d6fb58a6fda089 /sys/kern/kern_tc.c
parentccff17a7e586a86cb43e790abf9df6169f842503 (diff)
downloadFreeBSD-src-559ad519498a0936f44bb223aeb010c416b05a3f.zip
FreeBSD-src-559ad519498a0936f44bb223aeb010c416b05a3f.tar.gz
Don't forget to factor in the boottime when we calculate PPS timestamps.
Submitted by: Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp>
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r--sys/kern/kern_tc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 2f752a6..11100a0 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -596,6 +596,7 @@ pps_event(struct pps_state *pps, int event)
tcount &= pps->capth->th_counter->tc_counter_mask;
bt = pps->capth->th_offset;
bintime_addx(&bt, pps->capth->th_scale * tcount);
+ bintime_add(&bt, boottimebin);
bintime2timespec(&bt, &ts);
/* If the timecounter was wound up underneath us, bail out. */
OpenPOWER on IntegriCloud