aboutsummaryrefslogtreecommitdiff
path: root/src/process
diff options
context:
space:
mode:
authorChris E Ferron <chris.e.ferron@linux.intel.com>2012-05-14 10:34:01 -0700
committerChris E Ferron <chris.e.ferron@linux.intel.com>2012-05-14 10:35:17 -0700
commitee067f609aad8f7a21050c5d0a4db738fe6041d7 (patch)
treedf57fd0daaefb7a73ca4c2238650ab222146abac /src/process
parentff4ea11b4da748f27fcb80a12e143d8d5107f0a7 (diff)
downloadpowertop-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.cpp7
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;
}