Package org.epics.pvdata.property
Class TimeStampFactory
- java.lang.Object
-
- org.epics.pvdata.property.TimeStampFactory
-
-
Constructor Summary
Constructors Constructor Description TimeStampFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double seconds)Add the number of seconds.voidadd(long seconds)Add the number of seconds.static TimeStampcreate()Create an instance of a timeStamp.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.
-
-
-
Method Detail
-
create
public static TimeStamp create()
Create an instance of a timeStamp.- Returns:
- the interface
-
getUserTag
public int getUserTag()
Description copied from interface:TimeStampGet the userTag.- Specified by:
getUserTagin interfaceTimeStamp- Returns:
- the userTag
-
setUserTag
public void setUserTag(int userTag)
Description copied from interface:TimeStampset the userTag.- Specified by:
setUserTagin interfaceTimeStamp- Parameters:
userTag- the value for the userTag
-
add
public void add(double seconds)
Description copied from interface:TimeStampAdd the number of seconds.
-
add
public void add(long seconds)
Description copied from interface:TimeStampAdd the number of seconds.
-
diff
public double diff(TimeStamp a, TimeStamp b)
Description copied from interface:TimeStampGet the difference, i.e. a-b
-
equals
public boolean equals(TimeStamp other)
Description copied from interface:TimeStampDoes this timeStamp have the same time as the other?
-
le
public boolean le(TimeStamp other)
Description copied from interface:TimeStampIs the time for this timeStamp earlier than or equal to the other.
-
lt
public boolean lt(TimeStamp other)
Description copied from interface:TimeStampIs the time for this timeStamp earlier than for the other?
-
getEpicsSecondsPastEpoch
public long getEpicsSecondsPastEpoch()
Description copied from interface:TimeStampGet the number of seconds since the January 1, 1990, 00:00:00 UTC- Specified by:
getEpicsSecondsPastEpochin interfaceTimeStamp- Returns:
- the number of seconds
-
getMilliSeconds
public long getMilliSeconds()
Description copied from interface:TimeStampGet the number of milliSeconds since the January 1, 1970, 00:00:00 UTC- Specified by:
getMilliSecondsin interfaceTimeStamp- Returns:
- the number
-
getNanoseconds
public int getNanoseconds()
Description copied from interface:TimeStampGet the number of nanoseconds within the second.- Specified by:
getNanosecondsin interfaceTimeStamp- Returns:
- the number
-
getSecondsPastEpoch
public long getSecondsPastEpoch()
Description copied from interface:TimeStampGet the number of seconds since the January 1, 1970, 00:00:00 UTC- Specified by:
getSecondsPastEpochin interfaceTimeStamp- Returns:
- the number of seconds
-
normalize
public void normalize()
Description copied from interface:TimeStampAdjust secs and nanoseconds so that 0<=nanoseconds<nanoSecPerSec
-
put
public void put(long secondsPastEpoch, int nanoseconds)Description copied from interface:TimeStampPut the time.
-
put
public void put(long milliSeconds)
Description copied from interface:TimeStampPut the time in milliSeconds since January 1, 1970, 00:00:00 UTC
-
getCurrentTime
public void getCurrentTime()
Description copied from interface:TimeStampGet the current time.- Specified by:
getCurrentTimein interfaceTimeStamp
-
-