def totalseconds(timedelta):
    """Return the total number of seconds represented by a datetime.timedelta object, excluding fractions of seconds"""
    return timedelta.seconds + timedelta.days * 24 * 60 * 60
