diff --git a/sources.c b/sources.c index 30a3abe..0af3345 100644 --- a/sources.c +++ b/sources.c @@ -1300,27 +1300,6 @@ SRC_GetType(int index) /* ================================================== */ -SRC_Skew_Direction SRC_LastSkewChange(SRC_Instance inst) -{ - SRC_Skew_Direction result = SRC_Skew_Nochange; - - switch (SST_LastSkewChange(inst->stats)) { - case SST_Skew_Decrease: - result = SRC_Skew_Decrease; - break; - case SST_Skew_Nochange: - result = SRC_Skew_Nochange; - break; - case SST_Skew_Increase: - result = SRC_Skew_Increase; - break; - } - - return result; -} - -/* ================================================== */ - int SRC_Samples(SRC_Instance inst) { diff --git a/sources.h b/sources.h index c28102c..fecccc5 100644 --- a/sources.h +++ b/sources.h @@ -180,14 +180,6 @@ extern int SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report, struc extern SRC_Type SRC_GetType(int index); -typedef enum { - SRC_Skew_Decrease, - SRC_Skew_Nochange, - SRC_Skew_Increase -} SRC_Skew_Direction; - -extern SRC_Skew_Direction SRC_LastSkewChange(SRC_Instance inst); - extern int SRC_Samples(SRC_Instance inst); #endif /* GOT_SOURCES_H */ diff --git a/sourcestats.c b/sourcestats.c index 7259bde..b32b9ac 100644 --- a/sourcestats.c +++ b/sourcestats.c @@ -108,9 +108,6 @@ struct SST_Stats_Record { about estimated_frequency */ double skew; - /* This is the direction the skew went in at the last sample */ - SST_Skew_Direction skew_dirn; - /* This is the estimated residual variance of the data points */ double variance; @@ -216,7 +213,6 @@ SST_ResetInstance(SST_Stats inst) inst->min_delay_sample = 0; inst->estimated_frequency = 0; inst->skew = 2000.0e-6; - inst->skew_dirn = SST_Skew_Nochange; inst->estimated_offset = 0.0; inst->estimated_offset_sd = 86400.0; /* Assume it's at least within a day! */ inst->offset_time.tv_sec = 0; @@ -467,18 +463,6 @@ SST_DoNewRegression(SST_Stats inst) stress = fabs(old_freq - inst->estimated_frequency) / old_skew; - if (best_start > 0) { - /* If we are throwing old data away, retain the current - assumptions about the skew */ - inst->skew_dirn = SST_Skew_Nochange; - } else { - if (inst->skew < old_skew) { - inst->skew_dirn = SST_Skew_Decrease; - } else { - inst->skew_dirn = SST_Skew_Increase; - } - } - if (logfileid != -1) { LOG_FileWrite(logfileid, "%s %-15s %10.3e %10.3e %10.3e %10.3e %10.3e %7.1e %3d %3d %3d", UTI_TimeToLogForm(inst->offset_time.tv_sec), @@ -851,14 +835,6 @@ SST_DoSourceReport(SST_Stats inst, RPT_SourceReport *report, struct timeval *now } } - -/* ================================================== */ - -SST_Skew_Direction SST_LastSkewChange(SST_Stats inst) -{ - return inst->skew_dirn; -} - /* ================================================== */ int diff --git a/sourcestats.h b/sourcestats.h index 33005c9..f40ca31 100644 --- a/sourcestats.h +++ b/sourcestats.h @@ -135,14 +135,6 @@ extern void SST_DoSourceReport(SST_Stats inst, RPT_SourceReport *report, struct extern void SST_DoSourcestatsReport(SST_Stats inst, RPT_SourcestatsReport *report, struct timeval *now); -typedef enum { - SST_Skew_Decrease, - SST_Skew_Nochange, - SST_Skew_Increase -} SST_Skew_Direction; - -extern SST_Skew_Direction SST_LastSkewChange(SST_Stats inst); - extern int SST_Samples(SST_Stats inst); #endif /* GOT_SOURCESTATS_H */