def _timedeltaToSeconds(offset):
    """
    Convert a datetime.timedelta instance to simply a number of seconds.

    For example, you can specify purely second intervals with timedelta's
    constructor:

        >>> td = datetime.timedelta(seconds=99999999)

    but then you can't get them out again:

        >>> td.seconds
        35199

    This allows you to:

        >>> import epsilon.extime
        >>> epsilon.extime._timedeltaToSeconds(td)
        99999999.0

    @param offset: a L{datetime.timedelta} representing an interval that we
    wish to know the total number of seconds for.

    @return: a number of seconds
    @rtype: float
    """
    return ((offset.days * 60*60*24) +
            (offset.seconds) +
            (offset.microseconds * 1e-6))