|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.plot.timeline.data.Epoch
public class Epoch
A class encapsulating the conversion between absolute time specified as a TimeStamp and values on an Axis1D representing time.
Values on an Axis1D representing time are usually seconds since an epoch chosen to be close to the times of interest (in order to avoid numerical precision issues, particularly with OpenGL painters which deal with axis values as floats ).
Times Axis1D timeline are stored as seconds.
Constructor Summary | |
---|---|
Epoch(TimeStamp epoch)
|
Method Summary | |
---|---|
static Epoch |
currentTime()
|
double |
fromTimeStamp(TimeStamp time)
Converts a TimeStamp to a value along an Axis1D. |
TimeStamp |
getTimeStamp()
|
static Epoch |
posixEpoch()
|
TimeStamp |
toTimeStamp(double axisValue)
Converts a value along an Axis1D into an absolute time by interpreting the values along the Axis1D as offsets in seconds from the point in time represented by this Epoch. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Epoch(TimeStamp epoch)
Method Detail |
---|
public static Epoch posixEpoch()
public static Epoch currentTime()
public TimeStamp getTimeStamp()
public TimeStamp toTimeStamp(double axisValue)
axisValue
- a value returned by an Axis1D
public double fromTimeStamp(TimeStamp time)
time
- an absolute TimeStamp
toTimeStamp( double )
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |