summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2011-11-22 14:56:50 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:39:19 -0800
commit185720bcf7295deaa65d29926da435d389dfe9a2 (patch)
treed31951ddc3d347a8ac258714a4044a7eadd41b48 /net
parenta04be0f4e562ac58abf3dc795cc363a9dcca1532 (diff)
rtc: Fix some bugs that allowed accumulating time drift in suspend/resume
The current code checks if abs(delta_delta.tv_sec) is greater or equal to two before it discards the old delta value, but this can trigger at close to -1 seconds since -1.000000001 seconds is stored as tv_sec -2 and tv_nsec 999999999 in a normalized timespec. rtc_resume had an early return check if the rtc value had not changed since rtc_suspend. This effectivly stops time for the duration of the short sleep. Check if sleep_time is positive after all the adjustments have been applied instead since this allows the old_system adjustment in rtc_suspend to have an effect even for short sleep cycles. Change-Id: I00b45c0349ec91a4bab9b41a126b377515427898 Signed-off-by: Arve Hjønnevåg <arve@android.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions