Package: adjtimex
Version: 1.29-3
Severity: minor

$ /sbin/adjtimex -p
         mode: 0
       offset: 766894
    frequency: 5735179
     maxerror: 649789
     esterror: 2161
       status: 8193
time_constant: 10
    precision: 1
    tolerance: 32768000
         tick: 9999
     raw time:  1490397277s 23837440us = 1490397277.23837440

Observe that the "raw time" line shows in its two-part form a time over
23 million microseconds, i.e., over 23 seconds, into the present second.
Also, in its one-part form it shows a value that seems to treat these
microseconds as each being 1e-8 seconds long.  These displays are
inconsistent with each other, and inconsistent with the meaning of
microseconds.

What's really going on is that the STA_NANO flag is set (8192 in the
status), so the tv_usec field of the struct timeval doesn't actully
represent microseconds.  It represents *nanoseconds*.  The true raw time
is different from both of the values shown, and for the call made above
should have been shown as

     raw time:  1490397277s 23837440ns = 1490397277.023837440

-zefram

Reply via email to