Constructor and Description |
---|
TimeStampFactory() |
Modifier and Type | Method and Description |
---|---|
void |
add(double seconds)
Add the number of seconds.
|
void |
add(long seconds)
Add the number of seconds.
|
static TimeStamp |
create()
Create an instance of a timeStamp.
|
double |
diff(TimeStamp a,
TimeStamp b)
Get the difference, i.e.
|
boolean |
equals(TimeStamp other)
Does this timeStamp have the same time as the other.
|
void |
getCurrentTime()
Get the current time.
|
long |
getEpicsSecondsPastEpoch()
Get the number of seconds since the January 1, 1990, 00:00:00 UTC
|
long |
getMilliSeconds()
Get the number of milliSeconds since the January 1, 1970, 00:00:00 UTC
|
int |
getNanoSeconds()
Get the number of nanoseconds within the second.
|
long |
getSecondsPastEpoch()
Get the number of seconds since the January 1, 1970, 00:00:00 UTC
|
int |
getUserTag()
Get the userTag.
|
boolean |
le(TimeStamp other)
Is the time for this timeStamp earlier than or equal to the other.
|
boolean |
lt(TimeStamp other)
Is the time for this timeStamp earlier than for the other.
|
void |
normalize()
Adjust secs and nanoSeconds so that 0<=nanoSeconds |
void |
put(long milliSeconds)
Put the time in milliSeconds since January 1, 1970, 00:00:00 UTC
|
void |
put(long secondsPastEpoch,
int nanoSeconds)
Put the time.
|
void |
setUserTag(int userTag)
set the userTag.
|
public static TimeStamp create()
public int getUserTag()
TimeStamp
getUserTag
in interface TimeStamp
public void setUserTag(int userTag)
TimeStamp
setUserTag
in interface TimeStamp
userTag
- The value for the userTag.public void add(double seconds)
TimeStamp
public void add(long seconds)
TimeStamp
public double diff(TimeStamp a, TimeStamp b)
TimeStamp
public boolean equals(TimeStamp other)
TimeStamp
public boolean le(TimeStamp other)
TimeStamp
public boolean lt(TimeStamp other)
TimeStamp
public long getEpicsSecondsPastEpoch()
TimeStamp
getEpicsSecondsPastEpoch
in interface TimeStamp
public long getMilliSeconds()
TimeStamp
getMilliSeconds
in interface TimeStamp
public int getNanoSeconds()
TimeStamp
getNanoSeconds
in interface TimeStamp
public long getSecondsPastEpoch()
TimeStamp
getSecondsPastEpoch
in interface TimeStamp
public void normalize()
TimeStamp
public void put(long secondsPastEpoch, int nanoSeconds)
TimeStamp
public void put(long milliSeconds)
TimeStamp
public void getCurrentTime()
TimeStamp
getCurrentTime
in interface TimeStamp
Copyright © 2014. All Rights Reserved.