summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/kern_ntptime.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/kern_ntptime.c')
-rw-r--r--cpukit/score/src/kern_ntptime.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/cpukit/score/src/kern_ntptime.c b/cpukit/score/src/kern_ntptime.c
index 1233166a61..0d982e397b 100644
--- a/cpukit/score/src/kern_ntptime.c
+++ b/cpukit/score/src/kern_ntptime.c
@@ -862,11 +862,11 @@ hardupdate(offset)
* variables, except for the actual time and frequency variables, which
* are determined by this routine and updated atomically.
*
- * tsp - time at PPS
- * nsec - hardware counter at PPS
+ * tsp - time at current PPS event
+ * delta_nsec - time elapsed between the previous and current PPS event
*/
void
-hardpps(struct timespec *tsp, long nsec)
+hardpps(struct timespec *tsp, long delta_nsec)
{
long u_sec, u_nsec, v_nsec; /* temps */
l_fp ftemp;
@@ -903,12 +903,9 @@ hardpps(struct timespec *tsp, long 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. If the result exceeds
- * the tick interval, the sample point has crossed a tick
- * boundary during the last second, so correct the tick. Very
- * intricate.
+ * has wrapped around, so correct 1.0 s.
*/
- u_nsec = nsec;
+ u_nsec = delta_nsec;
if (u_nsec > (NANOSECOND >> 1))
u_nsec -= NANOSECOND;
else if (u_nsec < -(NANOSECOND >> 1))