[bash] How to calculate time elapsed in bash script?