hlc_dart 1.2.0
hlc_dart: ^1.2.0 copied to clipboard
A Hybrid Logical Clock implementation in Dart, based on the paper "Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases".
1.2.0 #
Date: 2026-10-07
Added #
HybridLogicalClock.maxandHybridLogicalClock.min.- Benchmarks for encoding, decoding, comparing,
localEventandreceiveEvent.
Changed #
- The constructor throws a
RangeErrorunlesslfits in 48 bits andcin 16 bits, both non-negative (it asserted only the sign before);parsethrows aFormatException.
Fixed #
- A counter past 65535 wrapped in
toUint8ListandtoInt64:localEventandreceiveEventnow movelforward by 1 and restartcfrom 0. The 8-byte format is unchanged.
1.1.0+3 #
Date: 2026-10-04
- Documentation release: refreshes the CHANGELOG and docs published on pub.dev. No functional changes since
1.1.0.
1.1.0+2 #
Date: 2026-07-19
- Documentation release: refreshes the CHANGELOG and docs published on pub.dev. No functional changes since
1.1.0.
1.1.0+1 #
Date: 2026-07-18
- Documentation release: refreshes the CHANGELOG and docs published on pub.dev. No functional changes since
1.1.0.
1.1.0 #
Date: 2026-06-11
Added #
- Added encoder/decoder for 8-byte buffer for desktop and web interoperability
1.0.0 #
Date: 2025-08-18
Added #
- Can set a
maxDriftforreceiveEvent(addedClockDriftException) asDateTimeto get the logical/physical part of the timestamp as aDateTimeobjectnextTimestampandmergeto update the clock without mutating the original instance
Changed #
- chore: setup .github/workflows and update coverage links 33
- chore: improve documentation on
toInt64 - Assert non-negative logical time and counter