Java Swing Lamport/vector clock calculator for events over multiple processes
logical-clock_demo.mov
- tested with java 19.0.1
- clone repo with
git clone https://github.com/plt3/logical-clock - in project directory, compile with
javac LogicalClock.java - then run Swing application with
java LogicalClock
- press buttons to the left of process lines to add events to the process
- mouse over an event to automatically see its Lamport and vector timestamps
- click on an event to set it as the source for a message (you should see it highlighted in red)
- then, click on another event to set it as the destination for a message
- can clear all events and change the number of processes with the bottom buttons
- type the key of a process number to add events to that process
- i.e. typing
1will add an event to process P1
- i.e. typing
- type the letter of an event to set it as a message source, then another event to set it as the destination
- i.e. typing
abwill send a message from event a to event b
- i.e. typing
- type
+and-to increment/decrement the number of processes