linux date current timestamp in ms date +"%s" track runtime start=$(date +"%s") sleep 1 let diff="$(date +'%s')-${start}" echo "diff: $diff"