def METHOD_NAME(self, deadline: float) -> float:
    virtual_timeout = deadline - self.current_time()
    if virtual_timeout <= 0:
        return 0
    elif self._rate > 0:
        return virtual_timeout / self._rate
    else:
        return 999999999