timedelta.total_seconds does not exist in Python 2.6 yet