public <T> TimedResult<T> measureIf(final boolean isTimed, final Supplier<T> resultSupplier) {
            if (isTimed) {
                final TimedResult<T> timedResult = DurationTimer.measure(resultSupplier);
                logIteration(timedResult);
                return timedResult;
            } else {
                return TimedResult.zero(resultSupplier.get());
            }
        }
Measures the time taken to perform resultSupplier if isTimed is true.
If isTimed is false returns a {@link TimedResult} containing a zero duration.
stroom-util/src/main/java/stroom/util/logging/DurationTimer.java