Creates a new hybrid logical clock seeded with a UUIDv7 timestamp.
ReadonlytimeThe current UUIDv7 timestamp.
The timestamp is stored as four unsigned 32-bit lanes ordered from highest significance to lowest significance:
[first32bits, second32bits, third32bits, fourth32bits]
Compares two hybrid logical clock timestamps by their UUIDv7 timestamp.
Use this only when both timestamps have the same previous timestamp.
The left timestamp.
The right timestamp.
-1 if left is before right in logical time, 1 if left
is after right in logical time, and 0 if both timestamps are equal.
Advances the current timestamp by the given clock advancement.
The advancement is added to the fourth 32-bit lane. Overflow is carried into the third, second, and first 32-bit lanes in that order.
This method mutates HLC.time in place and returns an HLC timestamp linking the previous timestamp to a stable copy of this timestamp.
The clock advancement to add to the timestamp.
The previous timestamp, or CLOCK_START when
this is the first timestamp.
The linked hybrid logical clock timestamp.
Determines whether the given value is a valid hybrid logical clock timestamp.
The value to validate.
true if timestamp is a valid HLCTimestamp; otherwise
false.
Represents a hybrid logical clock backed by a UUIDv7 timestamp encoded as four unsigned 32-bit integer lanes.