Added function for computing total seconds for python compat