Functions/Scripting/Get-StepTimespan.ps1
Function Get-StepTimespan { [CmdletBinding()] Param ( # StepTimer Object [Parameter(Mandatory=$true)] [System.Collections.ArrayList] [AllowEmptyCollection()] $StepTimer, # Start Step Number [Parameter(Mandatory=$true)] [int] $StartStepNum, # Start Step Number [Parameter(Mandatory=$true)] [int] $EndStepNum ) # Get Timespan between steps $StartTime = ($StepTimer | where StepNum -eq $StartStepNum).StepTime $EndTime = ($StepTimer | where StepNum -eq $EndStepNum).StepTime $TimeSpan = [timespan]($EndTime-$StartTime) $TimeSpan } |