~testrepository/testrepository/trunk

1
2
3
4
5
6
7
def timedelta_to_seconds(delta):
    """Return the number of seconds that make up the duration of a timedelta.
    """
    return (
        (delta.microseconds + (delta.seconds + delta.days * 24 * 3600) * 10**6)
        / float(10**6))