mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 00:35:07 -05:00
conf: add clockprecision directive
Make the precision of the system clock configurable. This can be useful on servers using hardware timestamping to reduce the amount of noise added to the NTP timestamps and improve stability of NTP measurements.
This commit is contained in:
11
conf.c
11
conf.c
@@ -100,6 +100,7 @@ static double correction_time_ratio = 3.0;
|
||||
static double max_clock_error = 1.0; /* in ppm */
|
||||
static double max_drift = 500000.0; /* in ppm */
|
||||
static double max_slew_rate = 1e6 / 12.0; /* in ppm */
|
||||
static double clock_precision = 0.0; /* in seconds */
|
||||
|
||||
static SRC_AuthSelectMode authselect_mode = SRC_AUTHSELECT_MIX;
|
||||
static double max_distance = 3.0;
|
||||
@@ -544,6 +545,8 @@ CNF_ParseLine(const char *filename, int number, char *line)
|
||||
parse_broadcast(p);
|
||||
} else if (!strcasecmp(command, "clientloglimit")) {
|
||||
parse_clientloglimit(p);
|
||||
} else if (!strcasecmp(command, "clockprecision")) {
|
||||
parse_double(p, &clock_precision);
|
||||
} else if (!strcasecmp(command, "cmdallow")) {
|
||||
parse_allow_deny(p, cmd_restrictions, 1);
|
||||
} else if (!strcasecmp(command, "cmddeny")) {
|
||||
@@ -2048,6 +2051,14 @@ CNF_GetMaxSlewRate(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
double
|
||||
CNF_GetClockPrecision(void)
|
||||
{
|
||||
return clock_precision;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
double
|
||||
CNF_GetMaxDistance(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user