com.ibm.rational.test.lt.recorder.core

Interface ITimeReference



  • public interface ITimeReference
    A service that provides information and conversion about times in a recording session. A recording session has it own time scale, and timestamps are expressed in arbitray unit (called ticks). This unit is implementation dependent and is the most precise time unit available. Timestamps can be converted to a relative timeline, expressed in milliseconds and starting at 0. However this timeline in milliseconds is not expected to be as precise as the timestamp unit.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      long getClockFrequency()
      Returns the clock frequency, i.e. the number of unique timestamps within one second.
      long getInitialTime()
      Returns the time that corresponds to beginning of the time frame, expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970.
      long getInitialTimestamp()
      Returns the timestamp that corresponds to the beginning of the time frame (i.e. the beginning of the recording session).
      long toAbsoluteMilliseconds(long timestamp)
      Converts a time stamp expressed as ticks to a value expressed as milliseconds since the beginning of the time frame.
      long toAbsoluteTimestamp(long millis)
      Converts a time expressed as milliseconds since the beginning of the time frame to a time stamp in ticks.
      long toRelativeMilliseconds(long timestamp)
      Converts a duration expressed as ticks to a duration expressed in milliseconds.
      long toRelativeTimestamp(long millis)
      Converts a duration in milliseconds to a duration expressed as ticks.
    • Method Detail

      • getInitialTimestamp

        long getInitialTimestamp()
        Returns the timestamp that corresponds to the beginning of the time frame (i.e. the beginning of the recording session).
        Returns:
        A value in ticks.
      • getInitialTime

        long getInitialTime()
        Returns the time that corresponds to beginning of the time frame, expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970.
        Returns:
        A value in milliseconds.
      • getClockFrequency

        long getClockFrequency()
        Returns the clock frequency, i.e. the number of unique timestamps within one second.
        Returns:
        the clock frequency.
      • toAbsoluteMilliseconds

        long toAbsoluteMilliseconds(long timestamp)
        Converts a time stamp expressed as ticks to a value expressed as milliseconds since the beginning of the time frame.
        Parameters:
        timestamp - A time stamp.
        Returns:
        A value in milliseconds.
      • toRelativeMilliseconds

        long toRelativeMilliseconds(long timestamp)
        Converts a duration expressed as ticks to a duration expressed in milliseconds.
        Parameters:
        timestamp - A duration expressed as ticks.
        Returns:
        A duration expressed as milliseconds.
      • toAbsoluteTimestamp

        long toAbsoluteTimestamp(long millis)
        Converts a time expressed as milliseconds since the beginning of the time frame to a time stamp in ticks.
        Parameters:
        millis - A time in milliseconds since the beginning of the time frame.
        Returns:
        A time stamp in ticks.
      • toRelativeTimestamp

        long toRelativeTimestamp(long millis)
        Converts a duration in milliseconds to a duration expressed as ticks.
        Parameters:
        millis - A duration in milliseconds.
        Returns:
        An duration in ticks.
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.