one-line-wonders icon indicating copy to clipboard operation
one-line-wonders copied to clipboard

Getting duration of the last command (PowerShell)

Open Windos opened this issue 4 years ago • 0 comments

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 🤘

Windos avatar Oct 20 '20 09:10 Windos