rtc: Try to prevent RTC errors from accumulating.
authorArve Hjønnevåg <arve@android.com>
Sat, 26 Jul 2008 03:58:15 +0000 (20:58 -0700)
committerArve Hjønnevåg <arve@android.com>
Thu, 4 Feb 2010 05:27:10 +0000 (21:27 -0800)
commit65a84712596bfd5b0831b8a09691ad3eca391ade
tree390ded66b58c8c171e4565a32b0a0e23f3abbd38
parentd1d79061a9d4a184dc026ca6dc105d17da0693c3
rtc: Try to prevent RTC errors from accumulating.

When we resume we only know how many whole seconds has elapsed.
These errors would accumulate in delta. We now only set the delta
if it would change by more than two seconds. If we drift back by
by more than a second add one in resume.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/rtc/class.c