@staticmethod
    def timedelta_to_seconds(td):
        return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10 ** 6) / float(10 ** 6)

    # Comparison methods to sort by deadline, with object id as a tiebreaker
    # to guarantee a consistent ordering.  The heapq module uses __le__
    # in python2.5, and __lt__ in 2.6+ (sort() and most other comparisons
    # use __lt__).
Equivalent to td.total_seconds() (introduced in python 2.7).
dataset/ETHPy150Open felipecruz/zmqpy/zmqpy/eventloop/ioloop.py/_Timeout.timedelta_to_seconds