Include maximum clock frequency error in our dispersion

Add maxclockerror directive to set the stability of the clock (10 ppm by
default) and include it in our dispersion.
This commit is contained in:
Miroslav Lichvar
2010-12-02 14:56:01 +01:00
parent 63ef2badd6
commit cc3a8918f0
6 changed files with 61 additions and 2 deletions

13
local.c
View File

@@ -34,6 +34,7 @@
#include <assert.h>
#include <stddef.h>
#include "conf.h"
#include "local.h"
#include "localp.h"
#include "memory.h"
@@ -91,6 +92,8 @@ static DispersionNotifyListEntry dispersion_notify_list;
static int precision_log;
static double precision_quantum;
static double max_clock_error;
/* ================================================== */
/* Define the number of increments of the system clock that we want
@@ -157,6 +160,8 @@ LCL_Initialise(void)
temp_comp_ppm = 0.0;
calculate_sys_precision();
max_clock_error = CNF_GetMaxClockError() * 1e-6;
}
/* ================================================== */
@@ -187,6 +192,14 @@ LCL_GetSysPrecisionAsQuantum(void)
/* ================================================== */
double
LCL_GetMaxClockError(void)
{
return max_clock_error;
}
/* ================================================== */
void
LCL_AddParameterChangeHandler(LCL_ParameterChangeHandler handler, void *anything)
{