@mocanvas/sync · interface

LamportClock

interface LamportClock

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Methods · 3

get(): number

The current value.

observe(remote: number): void

Fold in a stamp seen from a peer: max(local, remote) + 1.

tick(): number

Advance for a local write and return the new value.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.