public class Timer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
disable()
Turn off the Timer.
|
static void |
enable()
Turn on the Timer.
|
static boolean |
isEnabled()
Is it on?
|
static java.lang.String |
report() |
static void |
report(java.io.PrintStream pw)
Writes the report() to the pass PrintStream.
|
static void |
reset()
Resets the Timer for the current thread.
|
static Procedure |
start()
Starts (and logs) a timer associated with the current thread.
|
static void |
stop(Procedure procedure)
Stops and logs the timing of the associated procedure.
|
public static void enable()
public static void disable()
public static boolean isEnabled()
public static Procedure start()
public static void stop(Procedure procedure)
procedure
- The Procedure to stop timing.public static void report(java.io.PrintStream pw)
pw
- A PrintStream to which to print the report String.public static void reset()
public static java.lang.String report()