Functions/Logging/Write-EndProcessLine.ps1

<#
    .SYNOPSIS
    Ends process line to calculate duration. See also Write-StartProcessLine.
    .DESCRIPTION
    Ends process line to calculate duration. See also Write-StartProcessLine.
    .EXAMPLE
    Write-EndProcessLine -TaskStartTime $TaskStartTime
    .PARAMETER $StartLogText
    Text to write in startlog
#>


function Write-EndProcessLine
{
    param
    (
        [parameter(Mandatory=$true)]
        [datetime] $TaskStartTime
    )
    PROCESS
    {
        Write-Host ("{0} >>> Duration: {1} seconds. `n" -f (Get-Date), ((Get-Date)-$TaskStartTime)) -ForegroundColor yellow
    }
}

Export-ModuleMember -Function Write-EndProcessLine