public <R> R call(final Supplier<R> supplier) {
            synchronized (this) {
                calling = true;
                calls++;
                startTime = System.nanoTime();
            }
            R r = supplier.get();
            final long delta = System.nanoTime() - startTime;
            synchronized (this) {
                calling = false;
                elapsed += delta;
            }
            return r;
        }
Creates a non-static {@link LocalMetrics} for transient use in a class/method.

@param isEnabled If false returns an instance that does nothing apart from call
                 the passed runnables/suppliers.
stroom-util/src/main/java/stroom/util/logging/SimpleMetrics.java