Calculates total seconds from hours, minutes, and seconds