java.lang.Object
com.sun.faces.util.Timer
This class is a simple wrapper for timing method calls. The traditional method is to add two variables, start, and
stop, and display the difference of these values. Encapsulates the process.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Timer
static Timer
getInstance
(Level logLevel) void
Log the timing result.void
Start timing.void
Stop timing.
-
Method Details
-
getInstance
- Returns:
- a new
Timer
instance if theTIMING
logging level isFINE
, otherwise, return null;
-
getInstance
-
startTiming
public void startTiming()Start timing. -
stopTiming
public void stopTiming()Stop timing. -
logResult
Log the timing result.- Parameters:
taskInfo
- task description
-