This code snippet shows how to calculate time differences.
In PowerShell, you can use New-TimeSpan
cmdlets to calculate the time differences between two dates/timestamps.
Code snippet
$current = Get-Date
$end= Get-Date
$diff= New-TimeSpan -Start $current -End $end
Write-Output "Time difference is: $diff"