local: replace is_step_change parameter of change handler with enum

Prepare for a new change type that will be added later.
This commit is contained in:
Miroslav Lichvar
2014-05-30 13:02:45 +02:00
parent b69b648d18
commit 44c9744d69
10 changed files with 32 additions and 26 deletions

11
local.h
View File

@@ -67,16 +67,21 @@ extern void LCL_GetOffsetCorrection(struct timeval *raw, double *correction, dou
doffset : delta offset applied (positive => make local system fast
by that amount, negative => make it slow by that amount)
is_step_change : true if change is being applied as a jump (using
settimeofday rather than adjtime)
change_type : what type of change is being applied
anything : Passthrough argument from call to registration routine */
typedef enum {
LCL_ChangeAdjust,
LCL_ChangeStep
} LCL_ChangeType;
typedef void (*LCL_ParameterChangeHandler)
(struct timeval *raw, struct timeval *cooked,
double dfreq,
double doffset, int is_step_change,
double doffset,
LCL_ChangeType change_type,
void *anything
);