mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
smooth: add option to smooth out only leap seconds
The leaponly option can be used to enable a mode where only leap seconds are smoothed out and normal offset/frequency changes are ignored. This is useful to make the interval in which a leap second is smoothed out constant and allow an NTP client to use multiple leap smearing servers safely.
This commit is contained in:
3
local.c
3
local.c
@@ -564,6 +564,9 @@ LCL_NotifyLeap(int leap)
|
||||
LCL_ReadRawTime(&raw);
|
||||
LCL_CookTime(&raw, &cooked, NULL);
|
||||
|
||||
/* Smooth the leap second out */
|
||||
SMT_Leap(&cooked, leap);
|
||||
|
||||
/* Dispatch to all handlers as if the clock was stepped */
|
||||
invoke_parameter_change_handlers(&raw, &cooked, 0.0, -leap, LCL_ChangeStep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user