What can be paused?
| Time-dependent behavior | Controlled by GuaClock? |
|---|---|
| Callbacks scheduled on GuaClock | Yes |
| Logic updated from the GuaClock tick stream | Yes |
Godot Timer / SceneTreeTimer | No, unless the logic is migrated to GuaClock |
Unity Time.deltaTime / WaitForSeconds / Coroutine | No, unless the logic is migrated to GuaClock |
| Physics, animation, audio, OS time, networking | No |
Think of integration as two separate steps: production game code receives GuaClock as its time source, and test code installs and controls that same shared clock. “Install” activates the virtual clock; it does not install itself into arbitrary game objects.
Connect game logic, then control it
// Replace the native timer used by this game subsystem.
var clock = GuaUnityRuntime.Clock;
clock.Schedule(TimeSpan.FromSeconds(2), ShowMessage);
// Tick-driven systems can subscribe to clock.Tick instead.
clock.Tick += UpdateCountdown;# Replace the Timer used by this game subsystem.
gua.clock_schedule(2000.0, _show_message)
# Tick-driven systems can subscribe to clock_tick instead.
gua.clock_tick.connect(_update_countdown)GuaClockControls.InstallClock(host.Context);
GuaClockControls.PauseClock(host.Context);
GuaClockControls.RunClockFor(host.Context, TimeSpan.FromSeconds(2));
GuaAssertions.WaitForText(host.Context, "Ready").ToBeVisible();| Operation | Effect |
|---|---|
Install | Starts a monotonic Gua clock at zero in running state. |
Pause | Freezes GuaClock time while the bridge and semantic UI collection keep running. |
RunFor | Executes due callbacks and tick slices, reaches the exact requested time, and stays paused. |
Resume | Returns GuaClock to adapter-provided unscaled real-time advancement. |
Godot and Unity
In Godot, migrate the target logic to GuaAutoAdapter.clock_schedule or its clock_tick signal. In Unity, inject or access GuaUnityRuntime.Clock and use Schedule or Tick. Their adapter pumps continue serving bridge commands while GuaClock is paused.
Remote controls
The WebSocket protocol, MCP server, and Inspector share get_clock, clock_install, clock_pause, clock_run_for, and clock_resume. .NET tests use the matching synchronous or asynchronous GuaClockControls methods.