public class TimestampUtils
extends java.lang.Object
Constructor and Description |
---|
TimestampUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
auditElapsedTime(com.ibm.websphere.ras.TraceComponent callingTc,
java.lang.String msgKey) |
static java.lang.String |
getElapsedTime() |
static java.lang.String |
getElapsedTime(long startTime)
Deprecated.
Replaced by @link
getElapsedTimeNanos(long) .
Note that System.currentTimeMillis can go backwards and hence you may get a string that starts with '-' character |
static java.lang.String |
getElapsedTimeNanos(long startTime) |
static long |
getStartTimeNano()
Returns the nanosecond tick count when the server started, which may be negative.
|
static long |
readTimeFromFile(java.io.File file) |
static void |
writeTimeToFile(java.io.File file,
long timestamp) |
public static void writeTimeToFile(java.io.File file, long timestamp)
public static long readTimeFromFile(java.io.File file)
public static void auditElapsedTime(com.ibm.websphere.ras.TraceComponent callingTc, java.lang.String msgKey)
nlsClass
- Class from the calling bundlemsgKey
- Translated message keypublic static java.lang.String getElapsedTime()
@Deprecated public static java.lang.String getElapsedTime(long startTime)
getElapsedTimeNanos(long)
.
Note that System.currentTimeMillis can go backwards and hence you may get a string that starts with '-' characterstartTime
- The start time (Obtained from System.currentTimeMillis)public static java.lang.String getElapsedTimeNanos(long startTime)
startTime
- The start time (Obtained from System.nanoTime)public static final long getStartTimeNano()