Class TimestampUtils

java.lang.Object
com.ibm.wsspi.kernel.service.utils.TimestampUtils

public class TimestampUtils extends Object
  • Constructor Details

    • TimestampUtils

      public TimestampUtils()
  • Method Details

    • writeTimeToFile

      public static void writeTimeToFile(File file, long timestamp)
    • readTimeFromFile

      public static long readTimeFromFile(File file)
    • auditElapsedTime

      public static void auditElapsedTime(com.ibm.websphere.ras.TraceComponent callingTc, String msgKey)
      Parameters:
      nlsClass - Class from the calling bundle
      msgKey - Translated message key
    • getElapsedTime

      public static String getElapsedTime()
    • getElapsedTime

      @Deprecated public static 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 String getElapsedTimeNanos(long startTime)
      Parameters:
      startTime - The start time (Obtained from System.nanoTime)
      Returns:
      a string version of the time since the startTime
    • getStartTimeNano

      public static final long getStartTimeNano()
      Returns the nanosecond tick count when the server started, which may be negative.