diff options
author | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-05-14 10:34:01 -0700 |
---|---|---|
committer | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-05-14 10:35:17 -0700 |
commit | ee067f609aad8f7a21050c5d0a4db738fe6041d7 (patch) | |
tree | df57fd0daaefb7a73ca4c2238650ab222146abac /src/process | |
parent | ff4ea11b4da748f27fcb80a12e143d8d5107f0a7 (diff) | |
download | powertop-2.0-v2-ee067f609aad8f7a21050c5d0a4db738fe6041d7.tar.gz |
show HH:MM for time left instead of just minutes
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/do_process.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/process/do_process.cpp b/src/process/do_process.cpp index e3d7856..ef2d1d2 100644 --- a/src/process/do_process.cpp +++ b/src/process/do_process.cpp @@ -788,6 +788,8 @@ void process_update_display(void) WINDOW *win; double pw; int tl; + int tlt; + int tlr; int show_power; int need_linebreak = 0; @@ -819,6 +821,9 @@ void process_update_display(void) pw = global_joules_consumed(); tl = global_time_left() / 60; + tlt = (tl /60); + tlr = tl % 60; + if (pw > 0.0001) { char buf[32]; wprintw(win, _("The battery reports a discharge rate of %sW\n"), @@ -826,7 +831,7 @@ void process_update_display(void) need_linebreak = 1; } if (tl > 0 && pw > 0.0001) { - wprintw(win, _("The estimated remaining time is %i minutes\n"), tl); + wprintw(win, _("The estimated remaining time is %i hours, %i minutes\n"), tlt, tlr); need_linebreak = 1; } |