]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't set system precision to log2 based value
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 11 Feb 2010 18:23:26 +0000 (19:23 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 16 Feb 2010 16:46:42 +0000 (17:46 +0100)
local.c

diff --git a/local.c b/local.c
index 0e69f5a1de0c40b31271bdc37a29aaf98e8aa501..5d832c313c8e0579dfb044c4e247a075957ed85c 100644 (file)
--- a/local.c
+++ b/local.c
@@ -123,14 +123,13 @@ calculate_sys_precision(void)
   if (!(best_dusec > 0)) {
     CROAK("best_dusec should be positive");
   }
+  precision_quantum = best_dusec * 1.0e-6;
   precision_log = 0;
   while (best_dusec < 500000) {
     precision_log--;
     best_dusec *= 2;
   }
 
-  precision_quantum = 1.0 / (double)(1<<(-precision_log));
-
   return;
 }