summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-02-24 10:29:41 +0000
committerCarl Hetherington <cth@carlh.net>2013-02-24 10:29:41 +0000
commitbbd352c3a0acf312e66b8be0d8bfb475275102d6 (patch)
tree9e52e7320e54caa0a3f63d7cb95e08f4f58fc147 /src
parentda0b66c3c8fc7b0813bb62ee48f24263bf4a682f (diff)
Tweak job progress reporting.
Diffstat (limited to 'src')
-rw-r--r--src/lib/job.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index bde2c8cfd..bfad65a0a 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -272,10 +272,11 @@ Job::status () const
}
stringstream s;
- if (!finished () && p >= 0 && t > 10 && r > 0) {
- s << pc << "%; " << seconds_to_approximate_hms (r) << " remaining";
- } else if (!finished () && (t <= 10 || r == 0)) {
+ if (!finished ()) {
s << pc << "%";
+ if (p >= 0 && t > 10 && r > 0) {
+ s << "; " << seconds_to_approximate_hms (r) << " remaining";
+ }
} else if (finished_ok ()) {
s << "OK (ran for " << seconds_to_hms (_ran_for) << ")";
} else if (finished_in_error ()) {