reference: allow clock adjustments without updating reference

Add support for accumulating frequency and time offset without changing
the reference parameters and calling the local parameter change
handlers.

This will allow an unsynchronized source to operate below other sources
in order to stabilize the clock.
This commit is contained in:
Miroslav Lichvar
2022-02-22 11:00:27 +01:00
parent 4c29f8888c
commit af6ae9186b
4 changed files with 77 additions and 17 deletions

18
local.c
View File

@@ -628,6 +628,24 @@ LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate)
/* ================================================== */
int
LCL_AccumulateFrequencyAndOffsetNoHandlers(double dfreq, double doffset, double corr_rate)
{
ChangeListEntry *first_handler;
int r;
first_handler = change_list.next;
change_list.next = &change_list;
r = LCL_AccumulateFrequencyAndOffset(dfreq, doffset, corr_rate);
change_list.next = first_handler;
return r;
}
/* ================================================== */
void
lcl_InvokeDispersionNotifyHandlers(double dispersion)
{