Just replace "" in one line script below with your command and it will output the time taken by the command in milli seconds
You can also manipulate the dividing factor (1000000 in command below) to get output with varying degrees of precision
START=$(date +%s%N); ; END=$(date +%s%N); DIFF=$(( $END - $START )); echo "It took $(( $DIFF / 1000000)) milli seconds"
You can also manipulate the dividing factor (1000000 in command below) to get output with varying degrees of precision
START=$(date +%s%N);
No comments:
Post a Comment