com.ibm.wsspi.kernel.service.utils
Class TimestampUtils
- java.lang.Object
com.ibm.wsspi.kernel.service.utils.TimestampUtils
- public class TimestampUtils
- extends java.lang.Object
Constructor Summary
Constructor and Description |
---|
TimestampUtils()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
auditElapsedTime(TraceComponent callingTc,java.lang.String msgKey)
|
|
getElapsedTime()
|
|
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
|
|
getElapsedTimeNanos(long startTime)
|
|
readTimeFromFile(java.io.File file)
|
|
writeTimeToFile(java.io.File file,long timestamp)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
TimestampUtils
- public TimestampUtils()
Method Detail
writeTimeToFile
- public static void writeTimeToFile( java.io.File file,
- long timestamp)
readTimeFromFile
- public static long readTimeFromFile( java.io.File file)
auditElapsedTime
- public static void auditElapsedTime( TraceComponent callingTc,
- java.lang.String msgKey)
msgKey
- Translated message key getElapsedTime
- public static java.lang.String getElapsedTime( )
getElapsedTime
- @Deprecated
- public 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
Parameters:
startTime
- The start time (Obtained from System.currentTimeMillis) Returns:
a string version of the time since the startTime
getElapsedTimeNanos
- public static java.lang.String getElapsedTimeNanos( long startTime)
Parameters:
startTime
- The start time (Obtained from System.nanoTime) Returns:
a string version of the time since the startTime