blob: dcca004c0f6bf3e93e3ebaae780aeae2b6bb4f09 (
plain)
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))
|