public class TTR_AbstractTimeDate extends TTR_AbstractInteger64
Abstract TTR carrying time/date with millisecond accuracy.
Note that binary 64 bit representation is in msec, like unix time_t * 1000. Actual accuracy is, of course, depends on time source available for sender.
NB! This is LOCAL time.
rawLength, tag| Modifier | Constructor and Description |
|---|---|
|
TTR_AbstractTimeDate(byte tag,
byte[] rec,
int rawLength) |
|
TTR_AbstractTimeDate(byte myTag,
Instant dt) |
|
TTR_AbstractTimeDate(byte myTag,
LocalDateTime ldt) |
protected |
TTR_AbstractTimeDate(byte myTag,
long number) |
| Modifier and Type | Method and Description |
|---|---|
Instant |
getInstant()
Convert to Instant time/date representation.
|
LocalDateTime |
getLocalDateTime() |
getValue, toBytesfromBytes, fromBytesAll, getRawLength, getTag, htonl, toBytespublic TTR_AbstractTimeDate(byte tag,
byte[] rec,
int rawLength)
protected TTR_AbstractTimeDate(byte myTag,
long number)
public TTR_AbstractTimeDate(byte myTag,
Instant dt)
public TTR_AbstractTimeDate(byte myTag,
LocalDateTime ldt)
public Instant getInstant()
public LocalDateTime getLocalDateTime()
Copyright © 2019. All rights reserved.