HLClock v0.1.1 HLClock.Timestamp View Source
HLC Timestamp
Implements the necessary components of the HLC tuple (i.e. logical time and logical counter) with extension to support node ids to provide unique timestamps even in cases where time and counter are the same
Binary representations assume big endianness for interop simplicity with other languages/representations.
Link to this section Summary
Functions
Exhaustive comparison of two timestamps: precedence is in order of time component, logical counter, and finally node identifier
Construct a Timestamp from the binary representation
Pack the rich Timestamp struct as a 128 bit byte array
Construct a timestamp from its principal components: logical time (initially node’s physical time), logical counter (initally zero), and the node id
Link to this section Functions
Exhaustive comparison of two timestamps: precedence is in order of time component, logical counter, and finally node identifier
Construct a Timestamp from the binary representation
Pack the rich Timestamp struct as a 128 bit byte array
48 bits - Physical time 16 bits - Logical time 64 bits - Node ID
Construct a timestamp from its principal components: logical time (initially node’s physical time), logical counter (initally zero), and the node id