summaryrefslogtreecommitdiff
path: root/sys/src/cmd/aux
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-06-25 20:28:51 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-06-25 20:28:51 +0200
commitc01833286b91b80caf56fd370ccc99060eb86a4a (patch)
tree339fc9b9adee1d30ec447059d7672d17d737a40c /sys/src/cmd/aux
parent5165864dbbdb90e41ef25c0576f5b06c990098d8 (diff)
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.
Diffstat (limited to 'sys/src/cmd/aux')
-rw-r--r--sys/src/cmd/aux/timesync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/aux/timesync.c b/sys/src/cmd/aux/timesync.c
index 11253efa9..e69281722 100644
--- a/sys/src/cmd/aux/timesync.c
+++ b/sys/src/cmd/aux/timesync.c
@@ -288,8 +288,8 @@ main(int argc, char **argv)
/* figure out our time interface and initial frequency */
inittime();
gettime(0, 0, &hz);
- minhz = hz/10;
- maxhz = hz*10;
+ minhz = hz / 2;
+ maxhz = hz * 2;
myprec = getclockprecision(hz);
/* convert the accuracy from nanoseconds to ticks */