public final class LongTime extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
EPOCH_MICROS |
static long |
EPOCH_MILLIS |
static long |
EPOCH_NANOS |
static long |
EPOCH_SECS |
static long |
MAX_MICROS |
static long |
MAX_MILLIS |
static long |
MAX_NANOS |
static long |
MAX_SECS |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isMicros(long time)
Tests whether the supplied value appears to be a microsecond based timestamp.
|
static boolean |
isMillis(long time)
Tests whether the supplied value appears to be a millisecond based timestamp.
|
static boolean |
isNanos(long time)
Tests whether the supplied value appears to be a nanosecond based timestamp.
|
static boolean |
isSecs(long time)
Tests whether the supplied value appears to be a second based timestamp.
|
static long |
toMicros(long time)
Converts the supplied time to microseconds.
|
static long |
toMillis(long time)
Converts the supplied time to milliseconds.
|
static long |
toNanos(long time)
Converts the supplied time to nanoseconds.
|
static long |
toSecs(long time)
Converts the supplied time to seconds.
|
public static final long MAX_NANOS
public static final long MAX_MICROS
public static final long MAX_MILLIS
public static final long MAX_SECS
public static final long EPOCH_SECS
public static final long EPOCH_MILLIS
public static final long EPOCH_MICROS
public static final long EPOCH_NANOS
public static boolean isSecs(long time)
time - candidate timestamp, expected to be no earlier than EPOCH_SECStrue if time falls between EPOCH_SECS and MAX_SECSpublic static boolean isMillis(long time)
time - candidate timestamp, expected to be within the millisecond rangetrue if time lies between EPOCH_MILLIS and MAX_MILLISpublic static boolean isMicros(long time)
time - candidate timestamp, expected to be within the microsecond rangetrue if time lies between EPOCH_MICROS and MAX_MICROSpublic static boolean isNanos(long time)
time - candidate timestamp, expected to be at least EPOCH_NANOStrue if time is not less than EPOCH_NANOSpublic static long toSecs(long time)
time - timestamp in seconds, milliseconds, microseconds or nanosecondspublic static long toMillis(long time)
time - timestamp in seconds, milliseconds, microseconds or nanosecondspublic static long toMicros(long time)
time - timestamp in seconds, milliseconds, microseconds or nanosecondspublic static long toNanos(long time)
time - timestamp in seconds, milliseconds, microseconds or nanosecondsCopyright © 2026 Chronicle Software Ltd. All rights reserved.