From 31c785b5da0cb8fcd7c84846901395ac253ef44c Mon Sep 17 00:00:00 2001 From: HedgeComp <94635857+HedgeComp@users.noreply.github.com> Date: Fri, 6 Sep 2024 13:00:09 -0400 Subject: [PATCH] Update BuildFFUVM.ps1 Add Hours to Total Time to complete only if greater than 1 hour --- FFUDevelopment/BuildFFUVM.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index 49d0a5b..3fa3f0f 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -4349,8 +4349,12 @@ Write-Host "FFU build process completed at" $endTime # Calculate the total run time $runTime = $endTime - $startTime -# Format the runtime as minutes and seconds -$runTimeFormatted = 'Duration: {0:mm} min {0:ss} sec' -f $runTime +# Format the runtime with hours, minutes, and seconds +if ($runTime.TotalHours -ge 1) { + $runTimeFormatted = 'Duration: {0:hh} hr {0:mm} min {0:ss} sec' -f $runTime +} else { + $runTimeFormatted = 'Duration: {0:mm} min {0:ss} sec' -f $runTime +} if ($VerbosePreference -ne 'Continue'){ Write-Host $runTimeFormatted