public class AuditTimer extends Object
Typical steps for using this class:
| Constructor and Description |
|---|
AuditTimer()
Default constructor.
|
AuditTimer(Logger logger)
Constructor that accepts logger to be used for output.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getTimeElapsedMillis() |
static boolean |
isAuditTimerEnabled() |
static boolean |
isAuditTimerEnabled(Logger logger) |
void |
log()
The same as log(String).
|
void |
log(String message)
Logs a message to the log4j logger in a following format:
your_message elapsed_time_milliseconds
|
void |
start()
Starts the timer.
|
long |
stop()
Stops the timer.
|
public AuditTimer()
public AuditTimer(Logger logger)
logger - public void start()
public long stop()
This method does not through Exception to keep client code simple.
public long getTimeElapsedMillis()
public void log()
public void log(String message)
your_message elapsed_time_milliseconds
message - public static boolean isAuditTimerEnabled(Logger logger)
logger - public static boolean isAuditTimerEnabled()
Copyright © 2026. All rights reserved.