mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 23:35:07 -05:00
conf: add option to set maximum slew rate
With the generic driver, the maxslewrate directive sets the maximum frequency offset that the driver is allowed to use to slew the time. By default, it's set to 83333.333 (1/12). This is identical to what Linux fast slewing used to use.
This commit is contained in:
11
conf.c
11
conf.c
@@ -88,6 +88,7 @@ static unsigned long command_key_id;
|
||||
static double max_update_skew = 1000.0;
|
||||
static double correction_time_ratio = 3.0;
|
||||
static double max_clock_error = 1.0; /* in ppm */
|
||||
static double max_slew_rate = 1e6 / 12.0; /* in ppm */
|
||||
|
||||
static double reselect_distance = 1e-4;
|
||||
static double stratum_weight = 1.0;
|
||||
@@ -422,6 +423,8 @@ CNF_ParseLine(const char *filename, int number, char *line)
|
||||
parse_double(p, &max_clock_error);
|
||||
} else if (!strcasecmp(command, "maxsamples")) {
|
||||
parse_int(p, &max_samples);
|
||||
} else if (!strcasecmp(command, "maxslewrate")) {
|
||||
parse_double(p, &max_slew_rate);
|
||||
} else if (!strcasecmp(command, "maxupdateskew")) {
|
||||
parse_double(p, &max_update_skew);
|
||||
} else if (!strcasecmp(command, "minsamples")) {
|
||||
@@ -1390,6 +1393,14 @@ CNF_GetCorrectionTimeRatio(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
double
|
||||
CNF_GetMaxSlewRate(void)
|
||||
{
|
||||
return max_slew_rate;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
double
|
||||
CNF_GetReselectDistance(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user