[PATCH] adjtimex: PPM scaling is by 2^-16
From: Jeff Epler
Date: Thu Jan 01 2015 - 22:23:32 EST
Signed-off-by: Jeff Epler <jepler@xxxxxxxxxxxxxx>
---
Like Laurent Georget, I found by reading ntpd source
the scale is 2^16 (i.e., 1 ~= 1.5e-5 ppm, 65536 = 1ppm)
Perhaps a wording like the following is suitable.
man2/adjtimex.2 | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
index 4b558b7..118908a 100644
--- a/man2/adjtimex.2
+++ b/man2/adjtimex.2
@@ -54,9 +54,8 @@ struct timex {
long offset; /* Time offset; nanoseconds, if STA_NANO
status flag is set, otherwise
microseconds */
- long freq; /* Frequency offset, as scaled PPM
+ long freq; /* Frequency offset, in units of 2^-16 PPM
(parts per million) */
-.\" FIXME What is the scaling unit of timex.freq? 2^16 ?
long maxerror; /* Maximum error (microseconds) */
long esterror; /* Estimated error (microseconds) */
int status; /* Clock command/status */
@@ -72,13 +71,13 @@ struct timex {
flag is set, otherwise microseconds */
long tick; /* Microseconds between clock ticks */
long ppsfreq; /* PPS (pulse per second) frequency
- (scaled PPM, read-only) */
+ (2^-16 PPM, read-only) */
long jitter; /* PPS jitter (read-only); nanoseconds, if
STA_NANO status flag is set, otherwise
microseconds */
int shift; /* PPS interval duration
(seconds, read-only) */
- long stabil; /* PPS stability (scaled PPM, read-only) */
+ long stabil; /* PPS stability (2^-16 PPM, read-only) */
long jitcnt; /* PPS jitter limit exceeded (read-only) */
long calcnt; /* PPS calibration intervals (read-only) */
long errcnt; /* PPS calibration errors (read-only) */
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/