Created
July 10, 2017 07:53
-
-
Save vpetruchok/15f54c3dfab263384cab21f31b6e2d8e to your computer and use it in GitHub Desktop.
PowerShell : Linux time command equivalent
This file contains hidden or 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
# from http://stackoverflow.com/questions/3513650/timing-a-commands-execution-in-powershell | |
function lastCommandTime() { | |
$command = Get-History -Count 1 | |
return $command.EndExecutionTime - $command.StartExecutionTime | |
} | |
set-alias lct lastCommandTime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment