| java.lang.Object org.ofbiz.base.util.UtilTimer
UtilTimer | public class UtilTimer (Code) | | Timer handling utility
Utility class for simple reporting of the progress of a process.
Steps are labelled, and the time between each label (or message)
and the time since the start are reported in each call to timerString.
author: David E. Jones version: $Revision: 1.3 $ since: 2.0 |
Constructor Summary | |
public | UtilTimer() Default constructor. |
lastMessageTime | long lastMessageTime(Code) | | |
realStartTime | long realStartTime(Code) | | |
startTime | long startTime(Code) | | |
UtilTimer | public UtilTimer()(Code) | | Default constructor. Starts the timer.
|
getLog | public boolean getLog()(Code) | | Gets the value of the log member, denoting whether log output is off or not
The value of log |
secondsSinceLast | public double secondsSinceLast()(Code) | | Returns the number of seconds since the last time timerString was called
The number of seconds since the last time timerString was called |
secondsSinceStart | public double secondsSinceStart()(Code) | | Returns the number of seconds since the timer started
The number of seconds since the timer started |
setLog | public void setLog(boolean log)(Code) | | Sets the value of the log member, denoting whether log output is off or not
Parameters: log - The new value of log |
timeSinceLast | public long timeSinceLast()(Code) | | Returns the number of milliseconds since the last time timerString was called
The number of milliseconds since the last time timerString was called |
timeSinceStart | public long timeSinceStart()(Code) | | Returns the number of milliseconds since the timer started
The number of milliseconds since the timer started |
timerString | public String timerString(String message)(Code) | | Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since the beginning
Parameters: message - A message to put into the timer String A String with the timing information, the timer String |
timerString | public String timerString(String message, String module)(Code) | | Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since the beginning
Parameters: message - A message to put into the timer String Parameters: module - The debug/log module/thread to use, can be null for root module A String with the timing information, the timer String |
timerString | public String timerString(int level, String message)(Code) | | Creates a string with information including the passed message, the time since the last call,
and the time since the beginning. This version allows an integer level to be specified to
improve readability of the output.
Parameters: level - Integer specifying how many levels to indent the timer string so the output can be more easily read through nested method calls. Parameters: message - A message to put into the timer String A String with the timing information, the timer String |
|
|