Skip to content

Wait in Sim Time

Your watch and KSA’s clock are different animals. At warp, thirty game-seconds can pass before your coffee cools. When paused, no game-seconds pass at all. Use the simulation clock.

Terminal window
# Wait 300 simulation seconds. The read blocks until the target time is reached.
ut=$(cat /sim/time/ut)
target=$(awk "BEGIN { print $ut + 300 }")
echo "$target" > /sim/time/alarm
cat /sim/time/alarm

The alarm is a blocking read, not a background timer. It returns the reached UT. In a program, calculate time steps from successive ut values. Do not call sleep(1) and hope that one second means one second.

Next: Hold a lock, the safe shape of a continuous controller.