remaining time (as a timedelta) until complete at current rate

def remaining_time(self):
        """remaining time (as a timedelta) until complete at current rate"""
        if self.rate == 0:
            return None
        else:
            remaining_progress = self.done - self.current
            if self.rate == 0:
                if self.done == 0:
                    return 0
                else:
                    return None

            return remaining_progress / self.rate