[chrony-dev] chronyd 3.5 on macOS |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-dev] chronyd 3.5 on macOS
- From: "Gerriet M. Denkmann" <gerrietm@xxxxxxxxxx>
- Date: Sat, 7 Dec 2019 13:51:39 +0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1575701504; bh=rBKz9bIevLWuWJAtJDDUnuGJ9+fgBI3KI/1qKBYIV6Q=; h=From:Content-Type:Subject:Date:To:Message-Id; b=RoOM76jb3DFJ1qyqObZpR1VLiyEzWPcniaPFhe7ojDaHeFd4HII2qCG3TVnaTzWKe +ErVyJqA6JLKJBX+21Djff53Jo0614vjcFmvsqz9A91O/kDHmSphxqZ05m2n/+zrzl tMHUGPFijOxImq6FpIK/0Yg9cFOyk7GzJ5XHLfkHy6D8O1Uiq3c9H89eJjRnQ4lPia 5vaJNV4ieU68aY4bD9uX8Ah/T+ZOpgN32lYvOnwan3UIk137AySJXyhzEoOXPy9232 18vRFORVyUKaFyBzC4cjlJqR0xYQl0hrk9rrU/YWMl2liUgOKSfG1RWXn6tbxUm6O5 j0ALhnUa8JwzQ==
macOS seems to have two clocks:
• a hardware clock, which always runs (even if the device is switched off)
• and a software clock, which is used by all apps.
When the device starts (or awakes from sleep) the software clock is set from the hardware clock.
The problem: adjtime (or whatever chronyd uses to keep the software clock synced with ntp) does *not* update the hardware clock.
The only way to set the hardware clock I know of is settimeofday.
Assuming a computer where the hardware clock drifts with 17.36 ppm (= 1.5 sec / d.
After a month, after each wake-up the time will be 45 sec off; which then takes chronyd 3 or more hours to set correctly.
Workaround:
• have a launch daemon, which, whenever the system is going to sleep, does gettimeofday + settimeofday.
Would it be possible that chronyd does this?
Alternative: just do settimeofday periodically (e.g. every 15 minutes or so).
Gerriet.
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.