Ignore measurements around leap second

When current time is within 5 seconds of a leap second, don't accumulate
new samples or update the leap second status to increase the chances of
getting through safely.
This commit is contained in:
Miroslav Lichvar
2014-09-09 16:57:15 +02:00
parent e1accce498
commit 0e786f5907
3 changed files with 35 additions and 1 deletions

View File

@@ -161,6 +161,10 @@ extern void REF_EnableLocal(int stratum);
extern void REF_DisableLocal(void);
extern int REF_IsLocalActive(void);
/* Check if current raw or cooked time is close to a leap second
and is better to discard any measurements */
extern int REF_IsLeapSecondClose(void);
extern void REF_GetTrackingReport(RPT_TrackingReport *rep);
#endif /* GOT_REFERENCE_H */