Arve Hjønnevåg
9d187300df
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 >
2011-11-22 16:49:58 -08:00
..
2011-06-14 09:08:44 -07:00
2011-09-07 19:49:49 -07:00
2011-11-22 16:49:58 -08:00
2011-10-03 11:40:08 -07:00
2011-06-14 09:08:44 -07:00
2011-06-14 09:08:44 -07:00
2011-05-26 19:45:34 +02:00
2010-09-22 17:22:39 -07:00
2010-10-29 00:29:19 +02:00
2011-02-03 13:02:35 -08:00
2011-03-31 11:26:23 -03:00
2011-03-09 11:24:54 -08:00
2011-04-13 01:54:09 +02:00
2011-03-15 20:01:36 -07:00
2011-04-20 18:46:56 +02:00
2011-05-06 17:41:06 -07:00
2011-06-01 19:29:39 -07:00
2011-05-06 17:42:47 -07:00
2010-10-29 19:06:53 +09:00
2011-02-03 13:02:35 -08:00
2011-06-27 18:00:12 -07:00
2011-03-22 17:44:16 -07:00
2011-03-17 10:32:47 -06:00
2011-03-22 17:44:16 -07:00
2011-03-09 11:23:37 -08:00
2011-03-09 11:23:37 -08:00
2011-03-17 10:32:47 -06:00
2011-05-26 17:12:33 -07:00
2011-05-06 17:42:04 -07:00
2010-08-11 08:59:07 -07:00
2010-08-11 08:59:07 -07:00
2011-03-22 17:44:16 -07:00
2010-08-11 08:59:08 -07:00
2011-03-09 11:23:37 -08:00
2010-12-10 22:24:24 -08:00
2011-03-31 11:26:23 -03:00
2011-05-06 18:01:02 -07:00
2011-06-08 14:33:48 -06:00
2011-03-17 10:32:47 -06:00
2011-02-03 13:02:35 -08:00
2010-08-11 08:59:07 -07:00
2010-08-11 08:59:07 -07:00
2011-01-13 08:03:12 -08:00
2011-05-06 18:02:00 -07:00
2011-05-06 18:02:02 -07:00
2011-05-06 18:02:07 -07:00
2011-03-16 17:28:10 -07:00
2011-05-26 17:12:33 -07:00
2011-05-06 18:02:03 -07:00
2011-02-03 13:02:35 -08:00
2011-05-26 17:12:33 -07:00
2011-03-09 11:23:37 -08:00
2011-04-18 10:39:38 +02:00
2011-05-06 18:02:04 -07:00
2010-08-11 08:59:06 -07:00
2011-05-26 17:12:33 -07:00
2011-03-17 18:48:35 -07:00
2011-03-17 18:48:35 -07:00
2011-03-09 11:25:04 -08:00
2011-06-09 16:15:24 +08:00
2011-03-09 11:23:37 -08:00
2011-05-06 18:02:05 -07:00
2010-10-27 15:30:32 +09:00
2011-03-09 11:24:54 -08:00
2011-05-26 17:12:33 -07:00
2011-03-09 11:23:34 -08:00
2011-05-11 18:50:44 -07:00
2011-03-09 11:25:08 -08:00
2011-03-29 14:48:19 +02:00
2011-05-26 17:12:33 -07:00
2011-03-09 11:23:37 -08:00
2011-08-04 21:58:32 -07:00
2011-03-09 11:25:07 -08:00
2011-05-17 14:44:36 -04:00
2011-03-09 11:23:37 -08:00
2011-03-09 11:23:35 -08:00
2011-06-23 16:11:39 -07:00
2011-03-09 11:23:37 -08:00
2011-03-09 11:23:37 -08:00
2011-03-31 11:26:23 -03:00