code: public static CompletableFuture<Timeout> timeoutFuture(HashedWheelTimer hwt, long delay, TimeUnit timeUnit) {
      try {
        CompletableFuture<Timeout> future = new CompletableFuture<>();
        hwt.newTimeout(future::complete, delay, timeUnit);
        return future;
      } catch (Throwable t) {
        return exceptionalFuture(t);
      }
    }
docs: Return a future that completes with a timeout after a delay.