C
LamportClock
testedA Lamport clock for one site: hands out monotonically increasing op ids and advances past observed remote ops so locally-generated ids stay causally later.
Signature
ts
class LamportClockProperties
| Property | Type | Description |
|---|---|---|
valuereadonly | number | — |
Methods
tickGenerate the next op id for a local operation.
ts
tick(): OpIdReturns
OpIdobserveAdvance past a remote op so future local ticks are causally after it.
ts
observe(id: OpId): void| Parameter | Type | Description |
|---|---|---|
id | OpId | — |