sources: update reference leap status early

When a leap second status is updated by a source, don't wait for the
next source selection and full update of the reference. Count votes from
sources that passed the previous selection and update the reference leap
status directly.

This should allow leap seconds to spread quickly even when the
samples are dropped or delayed by the filters.
This commit is contained in:
Miroslav Lichvar
2020-03-11 17:03:00 +01:00
parent 2582be8754
commit 4883086fc1
3 changed files with 61 additions and 16 deletions

View File

@@ -162,6 +162,9 @@ extern void REF_SetManualReference
extern void
REF_SetUnsynchronised(void);
/* Announce a leap second before the full reference update */
extern void REF_UpdateLeapStatus(NTP_Leap leap);
/* Return the current stratum of this host or 16 if the host is not
synchronised */
extern int REF_GetOurStratum(void);