diff options
author | J William Piggott | 2014-10-20 21:22:24 +0200 |
---|---|---|
committer | J William Piggott | 2014-10-20 21:22:24 +0200 |
commit | bbb4c273e9b97268ed07520a203d887a2cb15044 (patch) | |
tree | 3224f0c35d3e24851896555b8b8e48cf8c0869b6 /sys-utils/hwclock.c | |
parent | hwclock: fix superfluous 'if' statement and typo (diff) | |
download | kernel-qcow2-util-linux-bbb4c273e9b97268ed07520a203d887a2cb15044.tar.gz kernel-qcow2-util-linux-bbb4c273e9b97268ed07520a203d887a2cb15044.tar.xz kernel-qcow2-util-linux-bbb4c273e9b97268ed07520a203d887a2cb15044.zip |
hwclock: Reduce drift factor update period
To facilitate the calculation of 'cold' vs 'warm' Hardware Clock drift
factor the limit on the update period needs to be less than 8 hours.
4 hours should be enough drift to allow calculations that are not
grossly out of range.
For example, with a workstation that is shutdown every night the cold
drift factor can be significantly different than a drift factor based on
a 24 hour period.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
Diffstat (limited to 'sys-utils/hwclock.c')
-rw-r--r-- | sys-utils/hwclock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index b7fbb98e9..008b20abe 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1015,10 +1015,10 @@ adjust_drift_factor(struct adjtime *adjtime_p, "calibration time is zero,\n" "so history is bad and calibration startover " "is necessary.\n")); - } else if ((hclocktime.tv_sec - adjtime_p->last_calib_time) < 24 * 60 * 60) { + } else if ((hclocktime.tv_sec - adjtime_p->last_calib_time) < 4 * 60 * 60) { if (debug) printf(_("Not adjusting drift factor because it has " - "been less than a day since the last " + "been less than four hours since the last " "calibration.\n")); } else if (adjtime_p->last_calib_time != 0) { /* |