Class TimeUtils
java.lang.Object
org.craftercms.studio.impl.v2.utils.TimeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TlogExecutionTime(Supplier<T> supplier, org.slf4j.Logger methodLogger, String message) High order function to inject execution time if the logger is enabled trace.
-
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, useLogExecutionTimeannotation when possible- Type Parameters:
T-- Parameters:
supplier- method to calculate the execution timemethodLogger- logger of the methodmessage- a message to flag the execution method- Returns:
-