time property
int
get
time
The NTP64 time as a Dart int carrying the raw unsigned-64 bit-pattern.
Values ≥ 2⁶³ read as negative in Dart but are bit-exact; the full 64-bit value is preserved with no narrowing.
Implementation
int get time {
final tsSize = bindings.zd_timestamp_sizeof();
// Kept deliberately alongside the constructor's length guard: this pair
// (here and in `id`) diagnoses a canon LAYOUT drift and names that cause,
// where the guard would only report a bare length mismatch. Defence in
// depth - the invariant's release-mode reach is the constructor's throw,
// not these asserts, which cost nothing.
assert(tsSize == 24, 'z_timestamp_t drifted from 24 bytes: $tsSize');
final ptr = calloc<Uint8>(tsSize);
try {
ptr.asTypedList(tsSize).setAll(0, _raw);
return bindings.zd_timestamp_ntp64_time(ptr);
} finally {
calloc.free(ptr);
}
}