summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/kern_ntptime.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/kern_ntptime.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/cpukit/score/src/kern_ntptime.c b/cpukit/score/src/kern_ntptime.c
index 44d56cf59e..c6f70079b3 100644
--- a/cpukit/score/src/kern_ntptime.c
+++ b/cpukit/score/src/kern_ntptime.c
@@ -900,16 +900,10 @@ hardpps(struct timespec *tsp, long delta_nsec)
pps_tf[0].tv_nsec = u_nsec;
/*
- * Compute the difference between the current and previous
- * counter values. If the difference exceeds 0.5 s, assume it
- * has wrapped around, so correct 1.0 s.
+ * Update the frequency accumulator using the difference between the
+ * current and previous PPS event measured directly by the timecounter.
*/
- u_nsec = delta_nsec;
- if (u_nsec > (NANOSECOND >> 1))
- u_nsec -= NANOSECOND;
- else if (u_nsec < -(NANOSECOND >> 1))
- u_nsec += NANOSECOND;
- pps_fcount += u_nsec;
+ pps_fcount += delta_nsec - NANOSECOND;
if (v_nsec > MAXFREQ || v_nsec < -MAXFREQ)
goto out;
time_status &= ~STA_PPSJITTER;