Low-level design
Event-driven simulation
A clock and a queue of callbacks scheduled for future ticks, with cancellation and callbacks that schedule more callbacks. The same loop runs inside every event loop and discrete-event simulator.
Reading
Classic Talks on Performance and Production Various speakers 2 videos