Asynchronously program as if gears drive each other.Objects could be set different periods, which could be awaited inside, outside, enetr and exit.
Command-line gear generator
a gear module for freecad