one-line-wonders
one-line-wonders copied to clipboard
Getting duration of the last command (PowerShell)
Please describe your program and how to run it.
This file can be "dot sourced" in a PowerShell prompt:
. .\path\last_command_runtime.ps1
Or it's content can be types interactively at the prompt.
It will tell you how long the previous command took to execute.
The file also includes, in comments, the non-one-line version and an even shorter option for PowerShell 7.0 (maybe 6.0, but haven't tested) and above.
What Programming Language?
PowerShell 🤘