Commit Graph

2 Commits (73c4d9a3c7c847e6c06db21057674fb1c18a1b35)

Author SHA1 Message Date
Michael Brown 29a99ad513 msg: Represent hw_timestamp "ts" field as tmv_t
Convert a hardware timestamp to the internal tmv_t representation at
the earliest possible opportunity.  This allows us to:

- eliminate multiple redundant calls to timespec_to_tmv()

- use tmv_add() instead of open-coded manipulation of a struct
  timespec in ts_add()

- use tmv_to_Timestamp() instead of open-coded manipulation of a
  struct timespec and struct Timestamp in ts_to_Timestamp()

- use tmv_is_zero() instead of open-coded manipulation of a struct
  timespec in msg_sots_valid()

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-17 19:04:28 -07:00
Richard Cochran ab8dc20cf7 nsm: Implement the NetSync Monitor query.
This patch adds a new "NSM" program.  The new code handles only one
outstanding NSM command at a time.  If and when all four event time
stamps have arrived, the code prints the instantaneous estimated
offset without any averaging or smoothing.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-03-08 07:20:42 -08:00