14,954
edits
mNo edit summary |
|||
| Line 16: | Line 16: | ||
{{Linux}} console, {{Mac}} Terminal or Cygwin commands on {{Win}}<ref>[http://stackoverflow.com/questions/385408/get-program-execution-time-in-the-shell linux - Get program execution time in the shell - Stack Overflow]</ref><ref>[http://stackoverflow.com/questions/12199631/convert-seconds-to-hours-minutes-seconds bash - Convert seconds to hours, minutes, seconds - Stack Overflow]</ref> | {{Linux}} console, {{Mac}} Terminal or Cygwin commands on {{Win}}<ref>[http://stackoverflow.com/questions/385408/get-program-execution-time-in-the-shell linux - Get program execution time in the shell - Stack Overflow]</ref><ref>[http://stackoverflow.com/questions/12199631/convert-seconds-to-hours-minutes-seconds bash - Convert seconds to hours, minutes, seconds - Stack Overflow]</ref> | ||
<pre> | <pre> | ||
# start the timer | |||
START=$(date +%s) | START=$(date +%s) | ||
| Line 21: | Line 22: | ||
sleep 2s | sleep 2s | ||
# stop the timer | |||
END=$(date +%s) | END=$(date +%s) | ||
DIFF=$(( $END - $START )) | DIFF=$(( $END - $START )) | ||