code: public static Timer timer(Metrics metrics, String component, String methodName) {
      if (metrics != null) {
        return metrics.getTimer(component, methodName);
      } else {
        return null;
      }
    }
docs: if metrics is not null returns a Timer instance for a given component and method name.
  
  @param metrics factory instance to get timer.
  @param component name for the requested timer.
  @param methodName for the requested timer.
  @return timer instance.