diff --git a/exist-core/src/main/java/org/exist/xquery/pragmas/TimePragma.java b/exist-core/src/main/java/org/exist/xquery/pragmas/TimePragma.java index d4e50043a21..6e8a44b6606 100644 --- a/exist-core/src/main/java/org/exist/xquery/pragmas/TimePragma.java +++ b/exist-core/src/main/java/org/exist/xquery/pragmas/TimePragma.java @@ -100,10 +100,12 @@ public void after(final XQueryContext context, final Expression expression) thro @Override public void resetState(final boolean postOptimization) { - if (timing != null && options.measurementMode == MeasurementMode.MULTIPLE) { - logMultipleMeasurement(); + if (timing != null) { + if (options.measurementMode == MeasurementMode.MULTIPLE) { + logMultipleMeasurement(); + } + this.timing.reset(); } - this.timing.reset(); } /**