public interface TimeStamp
Modifier and Type | Field and Description |
---|---|
static long |
microSecPerSec |
static long |
milliSecPerSec |
static long |
nanoSecPerSec |
static long |
posixEpochAtEpicsEpoch |
Modifier and Type | Method and Description |
---|---|
void |
add(double seconds)
Add the number of seconds.
|
void |
add(long seconds)
Add the number of seconds.
|
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.
|
static final long milliSecPerSec
static final long microSecPerSec
static final long nanoSecPerSec
static final long posixEpochAtEpicsEpoch
void normalize()
long getSecondsPastEpoch()
long getEpicsSecondsPastEpoch()
int getNanoSeconds()
int getUserTag()
void setUserTag(int userTag)
userTag
- The value for the userTag.void put(long secondsPastEpoch, int nanoSeconds)
secondsPastEpoch
- The number of seconds since January 1, 1970, 00:00:00 UTCnanoSeconds
- The number of nanoseconds within the second.long getMilliSeconds()
void put(long milliSeconds)
milliSeconds
- The number of milliSeconds.void getCurrentTime()
boolean equals(TimeStamp other)
other
- The other timeStamp.boolean lt(TimeStamp other)
other
- The other timeStamp.boolean le(TimeStamp other)
other
- The other timeStamp.void add(long seconds)
seconds
- The value.void add(double seconds)
seconds
- The value.Copyright © 2014. All Rights Reserved.