Log build runtime in minutes with seconds

This commit is contained in:
Markus Hoffrogge
2023-03-21 18:15:32 +01:00
committed by Igor Pečovnik
parent 915bd66187
commit cca7fe1ff3

View File

@@ -72,9 +72,9 @@ function main_default_end_build() {
declare end_timestamp
end_timestamp=$(date +%s)
declare runtime=$(((end_timestamp - start_timestamp) / 60))
declare runtime_seconds=$((end_timestamp - start_timestamp))
# display_alert in its own logging section.
LOG_SECTION="runtime_total" do_with_logging display_alert "Runtime" "${runtime} min" "info"
LOG_SECTION="runtime_total" do_with_logging display_alert "Runtime" "$(printf "%d:%02d min" $((runtime_seconds / 60)) $((runtime_seconds % 60)))" "info"
return 0
}