Package org.epics.pvdata.property
Interface TimeStamp
-
- All Known Implementing Classes:
TimeStampFactory
public interface TimeStampInterface TimeStamp.- Author:
- mrk
-
-
Field Summary
Fields Modifier and Type Field Description static longmicroSecPerSecstatic longmilliSecPerSecstatic longnanoSecPerSecstatic longposixEpochAtEpicsEpoch
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(double seconds)Add the number of seconds.voidadd(long seconds)Add the number of seconds.doublediff(TimeStamp a, TimeStamp b)Get the difference, i.e.booleanequals(TimeStamp other)Does this timeStamp have the same time as the other?voidgetCurrentTime()Get the current time.longgetEpicsSecondsPastEpoch()Get the number of seconds since the January 1, 1990, 00:00:00 UTClonggetMilliSeconds()Get the number of milliSeconds since the January 1, 1970, 00:00:00 UTCintgetNanoseconds()Get the number of nanoseconds within the second.longgetSecondsPastEpoch()Get the number of seconds since the January 1, 1970, 00:00:00 UTCintgetUserTag()Get the userTag.booleanle(TimeStamp other)Is the time for this timeStamp earlier than or equal to the other.booleanlt(TimeStamp other)Is the time for this timeStamp earlier than for the other?voidnormalize()Adjust secs and nanoseconds so that 0<=nanoseconds<nanoSecPerSecvoidput(long milliSeconds)Put the time in milliSeconds since January 1, 1970, 00:00:00 UTCvoidput(long secondsPastEpoch, int nanoseconds)Put the time.voidsetUserTag(int userTag)set the userTag.
-
-
-
Field Detail
-
milliSecPerSec
static final long milliSecPerSec
- See Also:
- Constant Field Values
-
microSecPerSec
static final long microSecPerSec
- See Also:
- Constant Field Values
-
nanoSecPerSec
static final long nanoSecPerSec
- See Also:
- Constant Field Values
-
posixEpochAtEpicsEpoch
static final long posixEpochAtEpicsEpoch
- See Also:
- Constant Field Values
-
-
Method Detail
-
normalize
void normalize()
Adjust secs and nanoseconds so that 0<=nanoseconds<nanoSecPerSec
-
getSecondsPastEpoch
long getSecondsPastEpoch()
Get the number of seconds since the January 1, 1970, 00:00:00 UTC- Returns:
- the number of seconds
-
getEpicsSecondsPastEpoch
long getEpicsSecondsPastEpoch()
Get the number of seconds since the January 1, 1990, 00:00:00 UTC- Returns:
- the number of seconds
-
getNanoseconds
int getNanoseconds()
Get the number of nanoseconds within the second.- Returns:
- the number
-
getUserTag
int getUserTag()
Get the userTag.- Returns:
- the userTag
-
setUserTag
void setUserTag(int userTag)
set the userTag.- Parameters:
userTag- the value for the userTag
-
put
void put(long secondsPastEpoch, int nanoseconds)Put the time.- Parameters:
secondsPastEpoch- the number of seconds since January 1, 1970, 00:00:00 UTCnanoseconds- the number of nanoseconds within the second
-
getMilliSeconds
long getMilliSeconds()
Get the number of milliSeconds since the January 1, 1970, 00:00:00 UTC- Returns:
- the number
-
put
void put(long milliSeconds)
Put the time in milliSeconds since January 1, 1970, 00:00:00 UTC- Parameters:
milliSeconds- the number of milliSeconds
-
getCurrentTime
void getCurrentTime()
Get the current time.
-
equals
boolean equals(TimeStamp other)
Does this timeStamp have the same time as the other?- Parameters:
other- the other timeStamp- Returns:
- (false,true) if (not same, same)
-
lt
boolean lt(TimeStamp other)
Is the time for this timeStamp earlier than for the other?- Parameters:
other- the other timeStamp- Returns:
- (false,true) if (not less, less)
-
le
boolean le(TimeStamp other)
Is the time for this timeStamp earlier than or equal to the other.- Parameters:
other- the other timeStamp- Returns:
- (false,true) if (not less or equal, less or equal))
-
add
void add(long seconds)
Add the number of seconds.- Parameters:
seconds- the number of seconds to add
-
add
void add(double seconds)
Add the number of seconds.- Parameters:
seconds- the number of seconds to add
-
-