How do I measure execution time of a command on the Windows command line?

后端 未结 30 3449
南笙
南笙 2020-11-22 09:44

Is there a built-in way to measure execution time of a command on the Windows command line?

30条回答
  •  故里飘歌
    2020-11-22 10:19

    Hehe, the most simple solution might be this:

    echo %time%
    YourApp.exe
    echo %time%
    

    This works on every Windows out of the box.


    In case of an application using console output, it might be convenient to store the starting time in a temporary variable:

    set startTime=%time%
    YourApp.exe
    echo Start Time: %startTime%
    echo Finish Time: %time%
    

提交回复
热议问题