public enum TimeUtil extends Enum<TimeUtil>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
static int |
TIME_IN_SECOND_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
static long |
fromInfluxDBTimeFormat(String time)
convert an influxdb timestamp used by influxdb to unix epoch time.
|
static String |
toInfluxDBTimeFormat(long time)
convert a unix epoch time to timestamp used by influxdb.
|
static String |
toTimePrecision(TimeUnit t)
Convert from a TimeUnit to a influxDB timeunit String.
|
static TimeUtil |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUtil INSTANCE
public static final int TIME_IN_SECOND_LENGTH
public static TimeUtil[] values()
for (TimeUtil c : TimeUtil.values()) System.out.println(c);
public static TimeUtil 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 static String toTimePrecision(TimeUnit t)
t - the TimeUnitpublic static String toInfluxDBTimeFormat(long time)
time - timestamp to use, in unix epoch timepublic static long fromInfluxDBTimeFormat(String time)
time - timestamp to use, in influxdb datetime formatCopyright © 2017. All rights reserved.