def __sub__()

in common/time_interval.py [0:0]


    def __sub__(self, other: TimeInterval) -> TimeInterval:
        if other._time > self._time:
            raise InvalidTimeAmount(
                "{} - {} results in negative time. Use the timedelta class.",
                self, other,
            )
        total_time_delta = self._time - other._time
        total_seconds = int(total_time_delta.total_seconds())
        return TimeInterval(total_seconds, TimeUnit.SECONDS)