lkml.org 
[lkml]   [2015]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] adjtimex: PPM scaling is by 2^-16
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
---
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

\
 
 \ /
  Last update: 2015-01-02 04:41    [W:0.261 / U:1.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site