fixed for python 2.6

objects of datetime.timedelta has no "total_seconds"
method on python 2.6