class OpenState<R> extends CircuitState<R> {
  private final long startTime = System.nanoTime();
  private final long delayNanos;

  public OpenState(CircuitBreakerImpl<R> breaker, CircuitState<R> previousState, Duration delay) {
    super(breaker, previousState.stats);
    this.delayNanos = delay.toNanos();
  }

  @Override
  public boolean tryAcquirePermit() {
    if (System.nanoTime() - startTime >= delayNanos) {
      breaker.halfOpen();
      return breaker.tryAcquirePermit();
    }

    return false;
  }

  @Override
  public Duration getRemainingDelay() {<FILL_FUNCTION_BODY>}

  @Override
  public State getState() {
    return State.OPEN;
  }
}

    long elapsedTime = System.nanoTime() - startTime;
    long remainingDelay = delayNanos - elapsedTime;
    return Duration.ofNanos(Math.max(remainingDelay, 0));
  
<methods>public java.time.Duration getRemainingDelay() ,public abstract dev.failsafe.CircuitBreaker.State getState() ,public dev.failsafe.internal.CircuitStats getStats() ,public void handleConfigChange() ,public synchronized void recordFailure(ExecutionContext<R>) ,public synchronized void recordSuccess() <variables>final non-sealed CircuitBreakerImpl<R> breaker,final non-sealed CircuitBreakerConfig<R> config,volatile dev.failsafe.internal.CircuitStats stats