com.jrockit.mc.flightrecorder.spi
Interface ITimeRange

All Known Subinterfaces:
IEvent
All Known Implementing Classes:
TimeRange

public interface ITimeRange

Interface for a time range. All time stamps a relative to 1 January 1970, in nanoseconds.

Author:
Erik Gahlin

Field Summary
static long INFINITE_DURATION
          * Value that represents an infinite duration.
static ITimeRange INFINITE_RANGE
          A range starting at negative infinity and ending at positive infinity.
static long NEGATIVE_INFINITY
          Value that represents negative infinity
static long POSITIVE_INFINITY
          Value that represents positive infinity
 
Method Summary
 long getDuration()
          Returns the duration of this range.
 long getEndTimestamp()
          Returns the end time of the range.
 long getStartTimestamp()
          Returns the start time of range.
 

Field Detail

NEGATIVE_INFINITY

static final long NEGATIVE_INFINITY
Value that represents negative infinity

See Also:
Constant Field Values

POSITIVE_INFINITY

static final long POSITIVE_INFINITY
Value that represents positive infinity

See Also:
Constant Field Values

INFINITE_DURATION

static final long INFINITE_DURATION
* Value that represents an infinite duration.

See Also:
Constant Field Values

INFINITE_RANGE

static final ITimeRange INFINITE_RANGE
A range starting at negative infinity and ending at positive infinity.

Method Detail

getStartTimestamp

long getStartTimestamp()
Returns the start time of range. Nanoseconds since January 1 1970 or NEGATIVE_INFINITY if start timestamp is some unknown time in the past.

Returns:
nanoseconds since 1 January 1970

getEndTimestamp

long getEndTimestamp()
Returns the end time of the range. Nanoseconds since January 1 1970 or POSITIVE_INFINITY if end timestamp is some unknown time in the future

Returns:
nanoseconds since 1 January 1970

getDuration

long getDuration()
Returns the duration of this range. Returns INFINITE_DURATION if start or end time is NEGATIVE_INFINITY or POSITIVE_INFINITY

Returns:
the duration in nanoseconds


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.