mpga/scripts/time.ps1

3 lines
260 B
PowerShell
Raw Normal View History

2020-01-21 14:03:41 +00:00
$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)"