Skip to content

Instantly share code, notes, and snippets.

@cp16net
Created July 12, 2012 20:26
Show Gist options
  • Save cp16net/3100736 to your computer and use it in GitHub Desktop.
Save cp16net/3100736 to your computer and use it in GitHub Desktop.
python 2.7 time_delta.total_seconds()
def get_total_seconds(td):
return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 1e6) / 1e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment