Class TimeUtils

java.lang.Object
org.craftercms.studio.impl.v2.utils.TimeUtils

public class TimeUtils extends Object
  • Constructor Details

    • TimeUtils

      public TimeUtils()
  • Method Details

    • logExecutionTime

      public static <T> T logExecutionTime(Supplier<T> supplier, org.slf4j.Logger methodLogger, String message)
      High order function to inject execution time if the logger is enabled trace. Instead of this method, use LogExecutionTime annotation when possible
      Type Parameters:
      T -
      Parameters:
      supplier - method to calculate the execution time
      methodLogger - logger of the method
      message - a message to flag the execution method
      Returns: