]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Add dispersion after Linux makestep
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 20 Apr 2010 12:26:59 +0000 (14:26 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 27 Apr 2010 12:35:27 +0000 (14:35 +0200)
sys_linux.c

index 642899e6620c5537e1f0a56a506e5afd3624be14..406b9d668e049c0be495fc64064590dd39fcbb13 100644 (file)
@@ -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();
 
 }