com.ibm.wsspi.kernel.service.utils

Class TimestampUtils

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.kernel.service.utils.TimestampUtils

  1. public class TimestampUtils
  2. extends java.lang.Object

Constructor Summary

Constructor and Description
TimestampUtils()

Method Summary

Modifier and Type Method and Description
  1. static
  2. void
auditElapsedTime(TraceComponent callingTc,java.lang.String msgKey)
  1. static
  2. java.lang.String
getElapsedTime()
  1. static
  2. 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
  1. static
  2. java.lang.String
getElapsedTimeNanos(long startTime)
  1. static
  2. long
readTimeFromFile(java.io.File file)
  1. static
  2. void
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

  1. public TimestampUtils()

Method Detail

writeTimeToFile

  1. public static void writeTimeToFile( java.io.File file,
  2. long timestamp)

readTimeFromFile

  1. public static long readTimeFromFile( java.io.File file)

auditElapsedTime

  1. public static void auditElapsedTime( TraceComponent callingTc,
  2. java.lang.String msgKey)
msgKey - Translated message key

getElapsedTime

  1. public static java.lang.String getElapsedTime( )

getElapsedTime

  1. @Deprecated
  2. 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

  1. 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