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)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:08 +0000 (17:49 -0700)
commitc7b52dfe8aaeb3b319dd970ab1d869a00de55296
tree0ad7d026a5c8ce76631805d9b4a05978eecab2f8
parentc4606c120818603260362b3440a60d46e7feb44e
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