From c15db71f9e1182e90b7955169da30da16d80ecdd Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 20 Apr 2010 14:26:59 +0200 Subject: [PATCH] Add dispersion after Linux makestep --- sys_linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys_linux.c b/sys_linux.c index 642899e..406b9d6 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -528,6 +528,7 @@ apply_step_offset(double offset) { struct timeval old_time, new_time; struct timezone tz; + double err; if (fast_slewing) { abort_slew(); @@ -543,6 +544,13 @@ apply_step_offset(double offset) CROAK("settimeofday in apply_step_offset"); } + if (gettimeofday(&old_time, &tz) < 0) { + CROAK("gettimeofday in apply_step_offset"); + } + + UTI_DiffTimevalsToDouble(&err, &old_time, &new_time); + lcl_InvokeDispersionNotifyHandlers(fabs(err)); + initiate_slew(); }