mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 09:55:06 -05:00
Don't set system precision to log2 based value
This commit is contained in:
3
local.c
3
local.c
@@ -123,14 +123,13 @@ calculate_sys_precision(void)
|
|||||||
if (!(best_dusec > 0)) {
|
if (!(best_dusec > 0)) {
|
||||||
CROAK("best_dusec should be positive");
|
CROAK("best_dusec should be positive");
|
||||||
}
|
}
|
||||||
|
precision_quantum = best_dusec * 1.0e-6;
|
||||||
precision_log = 0;
|
precision_log = 0;
|
||||||
while (best_dusec < 500000) {
|
while (best_dusec < 500000) {
|
||||||
precision_log--;
|
precision_log--;
|
||||||
best_dusec *= 2;
|
best_dusec *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
precision_quantum = 1.0 / (double)(1<<(-precision_log));
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user