forked from richardcochran/linuxptp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ts2phc: Don't switch system clock to nanosecond mode.
ts2phc is not synchronizing the system clock and should not switch the clock to the nanosecond mode with adjtimex(modes=ADJ_NANO) or make any other modifications to it. The process that is controlling the clock (e.g. an NTP client) might not be using the nanosecond mode. There are two instances of the adjtimex() call in the code. One is used only to read the clock and can be replaced with faster clock_gettime(). The other instance is also reading the TAI offset. Instead of switching to the nanosecond mode, change the timestamp conversion to handle both microsecond and nanosecond modes according to the current clock status. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
- Loading branch information
1 parent
17195fd
commit f271257
Showing
2 changed files
with
7 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters