If you want to calculate how much time something takes on the command line:
START=$(date +%s) # do your thing echo "$(echo "$(date +%s) - $START"|bc) seconds since start"