From 6581d4d367c71e69820ff081334d93e7b6711063 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 26 Aug 2023 01:32:13 +0200 Subject: [PATCH] Don't bother reporting job durations less than 10s. --- src/lib/job.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { -- 2.30.2