Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Powershell profile that shows the execution time of the last executed command in ms.
function prompt
$host.ui.rawui.WindowTitle = (get-location)
$lastCommand = Get-History -Count 1
if($lastCommand) { Write-Host ("last command took") ($lastCommand.EndExecutionTime - $lastCommand.StartExecutionTime).TotalMilliseconds ("ms") }
return "PS>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment