fix timedelta_to_seconds

Fix of calculating the number of seconds with timedelta with
microsecond.
new parameter to timedelta_to_seconds