  	}
  
  	/*
-@@ -967,6 +997,9 @@ pps_event(struct pps_state *pps, int eve
+@@ -967,6 +1000,9 @@ pps_event(struct pps_state *pps, int eve
  	/* Convert the count to a timespec. */
  	tcount = pps->capcount - pps->capth->th_offset_count;
  	tcount &= pps->capth->th_counter->tc_counter_mask;
 +#ifdef FFCLOCK
-+	ffcounter_record = pps->capth->ffcounter_record;
++	ffcounter_mark = pps->capffth->ffcounter_mark;
 +#endif
  	bt = pps->capth->th_offset;
  	bintime_addx(&bt, pps->capth->th_scale * tcount);
  	bintime_add(&bt, &boottimebin);
-@@ -979,6 +1012,11 @@ pps_event(struct pps_state *pps, int eve
+@@ -979,6 +1015,11 @@ pps_event(struct pps_state *pps, int eve
  	*pcount = pps->capcount;
  	(*pseq)++;
  	*tsp = ts;
 +#ifdef FFCLOCK
 +	(*ffclock_pseq)++;
 +	*ffclock_tsp = ts;
-+	*ffcounter = (ffcounter_record + tcount);
++	*ffcounter = (ffcounter_mark + tcount);
 +#endif
  
  	if (foff) {
  		timespecadd(tsp, osp);
 Index: sys/sys/timepps.h
 ===================================================================
---- sys.orig/sys/timepps.h	2010-12-22 19:03:01.000000000 +1100
-+++ sys/sys/timepps.h	2010-12-22 20:26:46.000000000 +1100
+--- sys.orig/sys/timepps.h	2010-12-22 20:48:42.000000000 +1100
++++ sys/sys/timepps.h	2010-12-23 00:21:54.000000000 +1100
 @@ -6,6 +6,12 @@
   * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
   * ----------------------------------------------------------------------------

+	struct timespec *ffclock_tsp;
+	pps_seq_t *ffclock_pseq;
+	ffcounter_t *ffcounter;
+	ffcounter_t ffcounter_record;
+#endif
 
 	KASSERT(pps != NULL, ("NULL pps pointer in pps_event"));
 	/* If the timecounter was wound up underneath us, bail out. */
@@ -944,6 +964,11 @@ pps_event(struct pps_state *pps, int eve
 		fhard = pps->kcmode & PPS_CAPTUREASSERT;
 		pcount = &pps->ppscount[0];
 		pseq = &pps->ppsinfo.assert_sequence;

Modification to the PPS-API to support ffcounter timestamps

---
 kern/kern_tc.c |   41 +++++++++++++++++++++++++++++++++++
 sys/timepps.h  |   65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)

Index: sys/kern/kern_tc.c
===================================================================
--- sys.orig/kern/kern_tc.c	2010-12-23 00:13:53.000000000 +1100
+++ sys/kern/kern_tc.c	2010-12-23 00:21:48.000000000 +1100
@@ -845,6 +845,9 @@ pps_ioctl(u_long cmd, caddr_t data, stru
 {
 	pps_params_t *app;
