/* ================================================== */
-void
+int
LCL_AccumulateOffset(double offset, double corr_rate)
{
struct timespec raw, cooked;
LCL_CookTime(&raw, &cooked, NULL);
if (!check_offset(&cooked, offset))
- return;
+ return 0;
(*drv_accrue_offset)(offset, corr_rate);
/* Dispatch to all handlers */
invoke_parameter_change_handlers(&raw, &cooked, 0.0, offset, LCL_ChangeAdjust);
+
+ return 1;
}
/* ================================================== */
/* ================================================== */
-void
+int
LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate)
{
struct timespec raw, cooked;
LCL_CookTime(&raw, &cooked, NULL);
if (!check_offset(&cooked, doffset))
- return;
+ return 0;
old_freq_ppm = current_freq_ppm;
/* Dispatch to all handlers */
invoke_parameter_change_handlers(&raw, &cooked, dfreq, doffset, LCL_ChangeAdjust);
+
+ return 1;
}
/* ================================================== */
forwards (i.e. it is currently slow of true time). Provided is also
a suggested correction rate (correction time * offset). */
-extern void LCL_AccumulateOffset(double offset, double corr_rate);
+extern int LCL_AccumulateOffset(double offset, double corr_rate);
/* Routine to apply an immediate offset by doing a sudden step if
possible. (Intended for use after an initial estimate of offset has
/* Perform the combination of modifying the frequency and applying
a slew, in one easy step */
-extern void LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate);
+extern int LCL_AccumulateFrequencyAndOffset(double dfreq, double doffset, double corr_rate);
/* Routine to read the system precision as a log to base 2 value. */
extern int LCL_GetSysPrecisionAsLog(void);