Created
August 18, 2014 16:37
-
-
Save stuartpreston/44186c464b6195143684 to your computer and use it in GitHub Desktop.
Powershell profile that shows the execution time of the last executed command in ms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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