Re: [chrony-dev] [GIT] chrony/chrony.git annotated tag, 1.27-pre1, created. 1.27-pre1 |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Mon, 12 Mar 2012, Miroslav Lichvar wrote:
On Mon, Mar 12, 2012 at 08:26:42AM -0700, Bill Unruh wrote:
Surely what is reported from the refclock is the time stamp, not the offset.
It is chrony which is stripping off the seconds to give an offset.
Ie, the raw offset should be the difference between the "true time" as set by
the refclock, and the system time. If the refclock does not know what second
it is (PPS) then that offset should be something like t-int(t+.5) not simply
t-int(t).
The PPS refclock driver sets the offset passed to the common refclock
routine to ts.tv_nsec / 1e9 where ts is the timestamp fetched from
kernel via PPSAPI. But it's not really an offset as it doesn't know
yet from which timestamp it should be substracted.
The code which prints the offset could shift it according to the PPS
rate though.
Yes, and if it does that, it could also just as well round off rather than
truncate
offset -(long)(offset*rate+1/(2*rate))/(double)rate
Note that this is the way it used to be AFAIK (chrony 1.24 with the shm
driver)-- you would get both pos and neg offsets in the raw time.
The SHM refclock is not a PPS refclock, the offset value coming from the
driver is a real offset.
Not sure what this means. Both simply hand chrony a timestamp, not an offset.
It is chrony that then manipulates that timestamp into an offset. And chrony
knows what the rate is. It is true that the shmpps driver itself waits until
the clock is stabilized to within .4 sec or so of the true time before feeding
the shm with timestamps. I assume that you are saying that the refclock_shm
chrony driver assumes that those are true timestamps of the nearest second.
But unless I am confused, the shm timestamps are really exactly the same as
the /dev/pps0 timestamps-- ie system timestamps of the local time that a PPS
pulse was received.
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.