public enum TimeAmount extends Enum<TimeAmount>
| Enum Constant and Description |
|---|
DAY |
HOUR |
MILLISECOND |
MINUTE |
MONTH |
SECOND |
WEEK |
YEAR |
| Modifier and Type | Method and Description |
|---|---|
static long |
currentMs() |
long |
ms() |
long |
ns() |
long |
ticks() |
static long |
ticksToMillis(long ticks) |
static TimeAmount |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeAmount[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeAmount MILLISECOND
public static final TimeAmount SECOND
public static final TimeAmount MINUTE
public static final TimeAmount HOUR
public static final TimeAmount DAY
public static final TimeAmount WEEK
public static final TimeAmount MONTH
public static final TimeAmount YEAR
public static TimeAmount[] values()
for (TimeAmount c : TimeAmount.values()) System.out.println(c);
public static TimeAmount valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic long ticks()
public long ms()
public long ns()
public static long ticksToMillis(long ticks)
public static long currentMs()
Copyright © 2018. All rights reserved.