@Override
    public Function<? super HttpService, ? extends HttpService> newDecorator(RequestTimeout parameter) {
        final long timeoutMillis = parameter.unit().toMillis(parameter.value());
        return delegate -> new SimpleDecoratingHttpService(delegate) {
            @Override
            public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
                if (timeoutMillis <= 0) {
                    ctx.clearRequestTimeout();
                } else {
                    ctx.setRequestTimeoutMillis(TimeoutMode.SET_FROM_START, timeoutMillis);
                }
                return delegate.serve(ctx, req);
            }
        };
    }
Creates a new decorator with the specified {@link RequestTimeout}.
core/src/main/java/com/linecorp/armeria/server/annotation/decorator/RequestTimeoutDecoratorFunction.java