• Miroslav Lichvar's avatar
    ntp: Make periodic RTC update more reliable · a97ad0c4
    Miroslav Lichvar authored
    The current code requires that the scheduled update of the RTC happens
    in the closest tick to the half of the second. This seems to be
    difficult to achieve reliably. The scheduled work may be missing the
    target time by a tick or two and be constantly rescheduled every second.
    
    Relax the limit to 10 ticks. As a typical RTC drifts in the 11-minute
    update interval by several milliseconds, this shouldn't affect the
    overall accuracy of the RTC much.
    Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    a97ad0c4
ntp.c 23 KB