Timer: Difference between revisions

Jump to navigation Jump to search
20 bytes added ,  30 July 2020
m
No edit summary
Line 33: Line 33:
== Windows command (DOS) ==
== Windows command (DOS) ==
<pre>
<pre>
# show the start time
REM show the start time
prompt $d $t $_$P$G
prompt $d $t $_$P$G


# do something
REM do something ...


# show the finish time
REM show the finish time
prompt $d $t $_$P$G
prompt $d $t $_$P$G
</pre>
</pre>
Line 44: Line 44:
or ...<ref>[https://stackoverflow.com/questions/673523/how-do-i-measure-execution-time-of-a-command-on-the-windows-command-line batch file - How do I measure execution time of a command on the Windows command line? - Stack Overflow]</ref><ref>[https://stackoverflow.com/questions/166044/sleeping-in-a-batch-file python - Sleeping in a batch file - Stack Overflow]</ref>
or ...<ref>[https://stackoverflow.com/questions/673523/how-do-i-measure-execution-time-of-a-command-on-the-windows-command-line batch file - How do I measure execution time of a command on the Windows command line? - Stack Overflow]</ref><ref>[https://stackoverflow.com/questions/166044/sleeping-in-a-batch-file python - Sleeping in a batch file - Stack Overflow]</ref>
<pre>
<pre>
# recode the start time
REM recode the start time
set startTime=%time%
set startTime=%time%


# do something
REM do something ...


# show the start and finish time
REM show the start and finish time
echo Start Time: %startTime%
echo Start Time: %startTime%
echo Finish Time: %time%
echo Finish Time: %time%
Anonymous user

Navigation menu