summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-08-26 01:32:13 +0200
committerCarl Hetherington <cth@carlh.net>2023-08-26 01:32:13 +0200
commit6581d4d367c71e69820ff081334d93e7b6711063 (patch)
tree836dbaf2b119a487db108194db7f7f47f99c60d9
parentd3455851f60ee6bc35ea4f314c62a7da51ce0d81 (diff)
Don't bother reporting job durations less than 10s.
-rw-r--r--src/lib/job.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index e37ca2aab..811e4c983 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -595,7 +595,10 @@ Job::status () const
return string(buffer);
};
auto const duration = _finish_time - _start_time;
- if (duration < 600) {
+ if (duration < 10) {
+ /* It took less than 10 seconds; it doesn't seem worth saying how long it took */
+ s = _("OK");
+ } else if (duration < 600) {
/* It took less than 10 minutes; it doesn't seem worth saying when it started and finished */
s = String::compose(_("OK (ran for %1)"), seconds_to_hms(duration));
} else {