private static HighResolutionClock buildClock(Config config) {
    MetricsConfig metricsConfig = new MetricsConfig(config);
    if (metricsConfig.getMetricsTimerEnabled()) {
      return System::nanoTime;
    } else {
      return () -> 0;
    }
  }
If "metrics.timer.enabled" is enabled, then returns a {@link HighResolutionClock} that uses
{@link System#nanoTime}.
Otherwise, returns a clock which always returns 0.
samza-kv/src/main/java/org/apache/samza/storage/kv/BaseKeyValueStorageEngineFactory.java