Lamport clock is the precursor of vector clock. Lamport clock timestamp is an integer number maintained at each process in a group of communicating processes. The timestamp is updated using three rules:
Whenever a process observes a significant event, it increments its timestamp.
Whenever a process sends a message to another process, it also adds its timestamp to the message.
Whenever a process receives a message from another process, it also adjusts its timestamp so that it is larger than the timestamp in the message but not smaller than its previous value.
The update rules are based on the definition of the causal relation. Obviously, when an event A causally precedes an event B, the Lamport clock timestamp associated with the event A is numerically smaller than the Lamport clock timestamp associated with the event B. The implication, however, does not hold in the opposite direction.