samplefilt: check for non-increasing sample times

Adopt the check from the refclock code to check also samples from NTP.
This commit is contained in:
Miroslav Lichvar
2018-08-23 14:19:16 +02:00
parent cffc856b50
commit bba29a0ee7
3 changed files with 34 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ extern SPF_Instance SPF_CreateInstance(int min_samples, int max_samples,
double max_dispersion, double combine_ratio);
extern void SPF_DestroyInstance(SPF_Instance filter);
extern void SPF_AccumulateSample(SPF_Instance filter, NTP_Sample *sample);
extern int SPF_AccumulateSample(SPF_Instance filter, NTP_Sample *sample);
extern int SPF_GetLastSample(SPF_Instance filter, NTP_Sample *sample);
extern int SPF_GetNumberOfSamples(SPF_Instance filter);
extern double SPF_GetAvgSampleDispersion(SPF_Instance filter);