mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Use boot based time for uptime in /proc
Commit 411187fb05 caused uptime not to increase
during suspend. This may cause confusion so I restore the old behaviour by
using the boot based time instead of monotonic for uptime.
Signed-off-by: Tomas Janousek <[email protected]>
Acked-by: John Stultz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
924b42d5a2
commit
d62141414a
2 changed files with 2 additions and 0 deletions
|
|
@ -105,6 +105,7 @@ static int uptime_read_proc(char *page, char **start, off_t off,
|
|||
cputime_t idletime = cputime_add(init_task.utime, init_task.stime);
|
||||
|
||||
do_posix_clock_monotonic_gettime(&uptime);
|
||||
monotonic_to_bootbased(&uptime);
|
||||
cputime_to_timespec(idletime, &idle);
|
||||
len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
|
||||
(unsigned long) uptime.tv_sec,
|
||||
|
|
|
|||
Loading…
Reference in a new issue