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

后端 未结 30 3533
南笙
南笙 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 09:58

    1. In the directory where your program is, type notepad mytimer.bat, click 'yes' to create a new file.

    2. Paste the code below, replacing YourApp.exe with your program, then save.

      @echo off
      date /t
      time /t
      YourApp.exe
      date /t
      time /t
      
    3. Type mytimer.bat in the command line then press Enter.

提交回复
热议问题