mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Log build runtime in minutes with seconds
This commit is contained in:
committed by
Igor Pečovnik
parent
915bd66187
commit
cca7fe1ff3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user