def time_delta(self, end_datetime: Optional[DateParseType] = None) -> timedelta:
        """
        Get a random timedelta object of duration between the current date and time and `end_datetime`

        :param end_datetime: A ``DateParseType``. Defaults to the current date and time

        :sample:
        :sample: end_datetime='+30h'
        """
        start_datetime = self._parse_start_datetime("now")
        end_datetime = self._parse_end_datetime(end_datetime)
        seconds = end_datetime - start_datetime

        ts = self._rand_seconds(*sorted([0, seconds]))
        return timedelta(seconds=ts)

        Get a random timedelta object of duration between the current date and time and `end_datetime`

        :param end_datetime: A ``DateParseType``. Defaults to the current date and time

        :sample:
        :sample: end_datetime='+30h'
        
faker/providers/date_time/__init__.py