mpga/scripts/time.ps1
2020-01-21 15:03:41 +01:00

3 lines
No EOL
260 B
PowerShell

$command = Get-History -Count 1
$delta = $command.EndExecutionTime - $command.StartExecutionTime
Write-Output "Last command took $($delta.TotalMilliseconds) ms ($($delta.Days)d $($delta.Hours)h $($delta.Minutes)m $($delta.Seconds)s $($delta.Milliseconds)ms)"