This is really just a lesson in how to use bc for formatting. This command takes a variable $time_millis and divides by 1000 to get time time in seconds, formatting to 2DP

time_secs=`echo "scale=2;${time_millis}/1000" | bc`