Constantine Kokkinos shows how to track time spent on the last command in Powershell:
You can select any property from the output and get just the TotalSeconds, but I like this simple output for when I have to leave some work in progress and I need to come back and check some time in the future.
If you are confused by this code and want further explanations, keep reading!
That’s a lot simpler than the “classic” .NET way of setting up a StopWatch and tracking changes.