|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.epics.pvmanager.util.TimeDuration
org.epics.util.time.TimeDuration
@Deprecated public class TimeDuration
A duration of time (such as 3 sec, 30ms, 1nsec) at the nanosecond precision. The duration is stored a (signed) long, which makes the maximum valid duration to around 292 years. No checks for overflows are done.
Note that while TimeStamp are usually created according to system clocks which takes into account leap seconds, all the math operations on TimeStamps do not take leap seconds into account.
Method Summary | |
---|---|
TimeInterval |
after(TimeStamp reference)
Deprecated. Returns a time interval that lasts this duration and starts from the given timestamp. |
TimeInterval |
around(TimeStamp reference)
Deprecated. Returns a time interval that lasts this duration and is centered around the given timestamp. |
static org.epics.util.time.TimeDuration |
asTimeDuration(TimeDuration duration)
Deprecated. |
TimeInterval |
before(TimeStamp reference)
Deprecated. Returns a time interval that lasts this duration and ends at the given timestamp. |
TimeDuration |
divideBy(int factor)
Deprecated. Returns a new duration which is smaller by the given factor. |
static TimeDuration |
durationOf(org.epics.util.time.TimeDuration duration)
Deprecated. |
boolean |
equals(java.lang.Object obj)
Deprecated. |
long |
getNanoSec()
Deprecated. Duration in nanoseconds. |
int |
hashCode()
Deprecated. |
static TimeDuration |
hour(double hour)
Deprecated. A new duration in hours. |
static TimeDuration |
hz(double hz)
Deprecated. A new duration in hertz, will convert to the length of the period. |
static TimeDuration |
min(double min)
Deprecated. A new duration in minutes. |
static TimeDuration |
ms(double ms)
Deprecated. A new duration in milliseconds. |
static TimeDuration |
ms(int ms)
Deprecated. A new duration in milliseconds. |
TimeDuration |
multiplyBy(int factor)
Deprecated. Returns a new duration which is bigger by the given factor. |
static TimeDuration |
nanos(long nanoSec)
Deprecated. A new duration in nanoseconds. |
static TimeDuration |
sec(double sec)
Deprecated. A new duration in seconds. |
java.lang.String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public long getNanoSec()
public static TimeDuration hour(double hour)
hour
- hours
public static TimeDuration min(double min)
min
- minutes
public static TimeDuration sec(double sec)
sec
- seconds
public static TimeDuration hz(double hz)
hz
- frequency to be converted to a duration
public static TimeDuration ms(int ms)
ms
- milliseconds of the duration
java.lang.IllegalArgumentException
- if the duration is negativepublic static TimeDuration ms(double ms)
ms
- milliseconds of the duration
java.lang.IllegalArgumentException
- if the duration is negativepublic static TimeDuration nanos(long nanoSec)
nanoSec
- nanoseconds of the duration
java.lang.IllegalArgumentException
- if the duration is negativepublic TimeDuration divideBy(int factor)
factor
- constant to divide
java.lang.IllegalArgumentException
- if factor is negativepublic TimeDuration multiplyBy(int factor)
factor
- constant to multiply
java.lang.IllegalArgumentException
- if factor is negativepublic TimeInterval around(TimeStamp reference)
reference
- a timestamp
public TimeInterval after(TimeStamp reference)
reference
- a timestamp
public TimeInterval before(TimeStamp reference)
reference
- a timestamp
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static TimeDuration durationOf(org.epics.util.time.TimeDuration duration)
public static org.epics.util.time.TimeDuration asTimeDuration(TimeDuration duration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |