jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java
Print this page
*** 646,651 ****
--- 646,673 ----
@Override
public ChainedOptionsBuilder param(String name, String... values) {
params.putAll(name, Arrays.asList(values));
return this;
}
+
+ // ---------------------------------------------------------------------------
+
+ private Optional<TimeValue> timeout = Optional.none();
+
+ @Override
+ public ChainedOptionsBuilder timeout(TimeValue value) {
+ this.timeout = Optional.of(value);
+ return this;
+ }
+
+ @Override
+ public Optional<TimeValue> getTimeout() {
+ if (otherOptions != null) {
+ return timeout.orAnother(otherOptions.getTimeout());
+ } else {
+ return timeout;
+ }
+ }
+
+ // ---------------------------------------------------------------------------
+
}