Skip to content

Instantly share code, notes, and snippets.

@vpetruchok
Created July 10, 2017 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpetruchok/15f54c3dfab263384cab21f31b6e2d8e to your computer and use it in GitHub Desktop.
Save vpetruchok/15f54c3dfab263384cab21f31b6e2d8e to your computer and use it in GitHub Desktop.
PowerShell : Linux time command equivalent
# 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