public class Epoch extends Object
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.
Modifier and Type | Method and Description |
---|---|
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.
|
public Epoch(TimeStamp epoch)
public static Epoch posixEpoch()
public static Epoch currentTime()
public TimeStamp getTimeStamp()
public TimeStamp toTimeStamp(double axisValue)
axisValue
- a value returned by an Axis1Dpublic double fromTimeStamp(TimeStamp time)
time
- an absolute TimeStamptoTimeStamp( double )
Copyright © 2016 Metron, Inc.. All rights reserved.