Update BuildFFUVM.ps1

Add Hours to Total Time to complete only if greater than 1 hour
This commit is contained in:
HedgeComp
2024-09-06 13:00:09 -04:00
committed by GitHub
parent 5f4cf0c66e
commit 31c785b5da
+5 -1
View File
@@ -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
# 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