mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
When chrony reads in the linux rtc for the first time to trim the system clock, it only reads it once. As it is possible that the rtc updates itself during the read operation, the reported rtc time could be false. To prevent this I've added a loop that reads the rtc clock twice, if the seconds do not match retry the two read operations. If they match you can assume the read operation was successful. This is based on the hwclock implementation of reading the rtc clock from the util-linux package.
29 KiB
29 KiB