Is there a built-in way to measure execution time of a command on the Windows command line?
The one-liner I use in Windows Server 2008 R2 is:
cmd /v:on /c "echo !TIME! & *mycommand* & echo !TIME!"
So long as mycommand doesn't require quotes (which screws with cmd's quote processing). The /v:on
is to allow for the two different TIME values to be evaluated independently rather than once at the execution of the command.