com.trifork.p4.api
Interface P4Timestamp


public interface P4Timestamp

The type P4Timestamp represents activity up to a given point in time in the profiler.

The timespan of the timestamp is the "wall clock" time (in milliseconds) from P4 agent startup to the time of timestamp extraction.

The Total time of the timestamp is the amount of program activity, also measured in milliseconds, that the P4 agent has registered from agent startup to the time of timestamp exstraction.

When subtracting two timestamps, the timespan of the result will be the difference between the timespans of the operands. Similarly, the total time of the result will be the difference of the total times of the operands.

Author:
Trifork P4 team (support@trifork.com)

Method Summary
 long getTimeSpan()
           
 long getTotalTime()
           
 P4Timestamp subtract(P4Timestamp other)
          Subtract another timestamp from this one, yielding the difference as a timestamp.
 void writeXML(java.io.OutputStream out)
          Serialise this timestamp to XML format.
 

Method Detail

writeXML

public void writeXML(java.io.OutputStream out)
              throws java.io.IOException
Serialise this timestamp to XML format.

Parameters:
out - Stream on which to write the XML structure
Throws:
java.io.IOException

subtract

public P4Timestamp subtract(P4Timestamp other)
Subtract another timestamp from this one, yielding the difference as a timestamp.

Parameters:
other - The timestamp to subtract from this one.
Returns:
The resulting timestamp.

getTotalTime

public long getTotalTime()

getTimeSpan

public long getTimeSpan()