timesync: reduce the frequency tolerance from half to double the system clock
the frequency tolerance used by timesync was from a 10th to 10 times the frequency of the system clock! switching a system from tsc to pic timer changes the system clock frequency from 300MHz to arround 1.8Ghz on a x200s laptop resulting in time running way too slow or way too fast. so we change timesync to only accept frequencies from half to double the system clock which still seems huge, but at least catches the case above resulting in timesync ignoring the old frequency file.
This commit is contained in:
parent
5165864dbb
commit
c01833286b
|
@ -288,8 +288,8 @@ main(int argc, char **argv)
|
||||||
/* figure out our time interface and initial frequency */
|
/* figure out our time interface and initial frequency */
|
||||||
inittime();
|
inittime();
|
||||||
gettime(0, 0, &hz);
|
gettime(0, 0, &hz);
|
||||||
minhz = hz/10;
|
minhz = hz / 2;
|
||||||
maxhz = hz*10;
|
maxhz = hz * 2;
|
||||||
myprec = getclockprecision(hz);
|
myprec = getclockprecision(hz);
|
||||||
|
|
||||||
/* convert the accuracy from nanoseconds to ticks */
|
/* convert the accuracy from nanoseconds to ticks */
|
||||||
|
|
Loading…
Reference in a new issue