|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.config.types.Period
public class Period
Representations of time in milliseconds.
Field Summary | |
---|---|
static long |
DAY
|
static long |
FOREVER
|
static long |
HOUR
|
static long |
INFINITE
|
static long |
MINUTE
|
static long |
MONTH
30 days |
static long |
SECOND
|
static long |
YEAR
365 days |
Constructor Summary | |
---|---|
Period()
|
|
Period(long period)
|
Method Summary | |
---|---|
void |
addText(java.lang.String text)
Sets the text. |
long |
getDefaultUnits()
Returns the default units (default is 1000) |
long |
getPeriod()
Replace with the real path. |
static long |
periodEnd(long now,
long period)
Calculates the next period end. |
static long |
toPeriod(java.lang.String value)
Converts a period string to a time. |
static long |
toPeriod(java.lang.String value,
long defaultUnits)
Converts a period string to a time. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long SECOND
public static final long MINUTE
public static final long HOUR
public static final long DAY
public static final long MONTH
public static final long YEAR
public static final long INFINITE
public static final long FOREVER
Constructor Detail |
---|
public Period()
public Period(long period)
Method Detail |
---|
public long getDefaultUnits()
public void addText(java.lang.String text) throws ConfigException
ConfigException
public long getPeriod()
public static long toPeriod(java.lang.String value) throws ConfigException
ms | milliseconds |
s | seconds |
m | minutes |
h | hours |
D | days |
W | weeks |
M | months |
Y | years |
ConfigException
public static long toPeriod(java.lang.String value, long defaultUnits) throws ConfigException
ms | milliseconds |
s | seconds |
m | minutes |
h | hours |
D | days |
W | weeks |
M | months |
Y | years |
ConfigException
public static long periodEnd(long now, long period)
now
- the current time in GMT ms since the epoch
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |