public interface Timestamp
Modifier and Type | Field and Description |
---|---|
static long |
MILLIS_PER_SECOND |
static Timestamp |
NONE
The
Timestamp from the number of milliseconds of UTC time since Unix epoch
1970-01-01T00:00:00Z set to none. |
Modifier and Type | Method and Description |
---|---|
static Timestamp |
fromMillis(long milliseconds)
Creates a
Timestamp from the number of milliseconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. |
static Timestamp |
fromSeconds(long seconds)
Creates a
Timestamp from the number of seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. |
default long |
toMillis()
Returns the number of milliseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
|
default long |
toSeconds()
Returns the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
|
static final Timestamp NONE
Timestamp
from the number of milliseconds of UTC time since Unix epoch
1970-01-01T00:00:00Z set to none.static final long MILLIS_PER_SECOND
static Timestamp fromSeconds(long seconds)
Timestamp
from the number of seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z.seconds
- the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00ZTimestamp
from the number of seconds of UTC time since Unix epochjava.lang.IllegalArgumentException
- when the seconds
argument is negativestatic Timestamp fromMillis(long milliseconds)
Timestamp
from the number of milliseconds of UTC time since Unix epoch
1970-01-01T00:00:00Z.milliseconds
- the number of milliseconds of UTC time since Unix epoch
1970-01-01T00:00:00ZTimestamp
from the number of milliseconds of UTC time since Unix epochjava.lang.IllegalArgumentException
- when the milliseconds
argument is negativedefault long toMillis()
default long toSeconds()