Mother DocsMother Docs
Buy me a Coffee
Steam Workshop
Discord
  • Cheatsheet
  • Mother OS (Ingame Script)
  • Mother GUI
  • Mother Autopilot System (MAPS)
  • Mother Core (Script Framework)
  • Mother Dev Tools
  • Motherland
  • Powered by Mother
  • Brand Guidelines
Buy me a Coffee
Steam Workshop
Discord
  • Cheatsheet
  • Mother OS (Ingame Script)
  • Mother GUI
  • Mother Autopilot System (MAPS)
  • Mother Core (Script Framework)
  • Mother Dev Tools
  • Motherland
  • Powered by Mother
  • Brand Guidelines
  • Cheatsheet
  • Mother OS (Ingame Script)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Command Line Interface (CLI)
      • Configuration
      • Modules
    • Core Modules

      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Intergrid Message Service
      • Local Storage
      • Merge Block Module
    • Extension Modules

      • Air Vent Module
      • AutoLCD Module
      • Battery Module
      • Terminal Block Module
      • Cockpit Module
      • Connector Module
      • Display Module
      • Door Module
      • Gas Tank Module
      • Hinge Module
      • Landing Gear Module
      • Light Module
      • Piston Module
      • Programmable Block Module
      • Rotor Module
      • Screen Module
      • Sensor Module
      • Sorter Module
      • Sound Block Module
      • Thruster Module
      • Timer Block Module
      • Wheel Module
    • Compatibility
    • Troubleshooting
    • Examples
  • Mother GUI
    • Getting Started

      • Installation
      • Configuration
    • Commands
    • Menus
    • Views
    • Examples
  • Mother Autopilot System (MAPS)
    • Getting Started

      • Upgrade Guide
      • Installation
    • Modules

      • Flight Planning Module
      • Map Module
      • Flight Control Module
      • Attitude Module
      • Docking Module
  • Mother Core (Script Framework)
    • Getting Started

      • Upgrade Guide
      • Installation
      • Architecture Overview
      • Managing Script Size & Complexity
    • Building A Module
    • Mother CLI (Console)
    • Core Modules
      • Activity Monitor
      • Almanac
      • Block Catalogue
      • Clock
      • Command Bus
      • Configuration
      • Event Bus
      • Intergrid Message Service
      • Local Storage
      • Log
      • Terminal
    • Utilities

      • Color Helper
      • Number Helper
      • Security
      • Serializer
    • Testing
    • Tutorials
  • Mother Dev Tools
  • Motherland
  • Powered By Mother
  • Brand Guidelines

Clock

  • Scheduling Repeating Work
  • Queueing Delayed Work
  • Running Coroutines
  • Useful Properties and Methods
  • Emitted Events

Clock is Mother's timing engine. It runs on Update10, which gives you about one tick every 0.166 seconds, and it supports three common patterns:

  1. Repeating work with Schedule().
  2. One-off delayed work with QueueForLater().
  3. Multi-step routines with AddCoroutine().

Scheduling Repeating Work

Use Schedule() for work that should repeat on a fixed interval.

TelemetryModule.cs
public override void Boot()
{
    Clock clock = GetModule<Clock>();
    clock.Schedule(UpdateTelemetry, 1);
    clock.Schedule(UpdateThreatAssessment, 5);
}

void UpdateTelemetry()
{
    Mother.Print($"Speed: {Mother.GetShipSpeed()}");
}

void UpdateThreatAssessment()
{
    // expensive scan here
}

Queueing Delayed Work

Use QueueForLater() when something should run once after a delay.

LaunchModule.cs
public void StartCountdown()
{
    Mother.Print("Launch in 10 seconds.");

    GetModule<Clock>().QueueForLater(() =>
    {
        Mother.Print("Ignition.");
        FireThrusters();
    }, 10);
}

Running Coroutines

Use AddCoroutine() when a task needs to yield across multiple cycles.

BootModule.cs
public override void Boot()
{
    GetModule<Clock>().AddCoroutine(SpinUpSequence());
}

IEnumerable<double> SpinUpSequence()
{
    Mother.Print("Opening blast doors...");
    OpenDoors();
    yield return 2.0;

    Mother.Print("Enabling reactors...");
    EnableReactors();
    yield return 1.0;

    Mother.Print("System ready.");
}

Useful Properties and Methods

MemberUse
QueuedTaskCountNumber of one-off delayed actions waiting to run
CoroutineCountNumber of active coroutines
GetLoader()Small / or \ activity indicator used by Terminal
Reset()Clears queued tasks, repeating tasks, and coroutines
ClearScheduledTasks()Clears only repeating scheduled tasks
Halt()Clears queued delayed tasks and active coroutines. Repeating system tasks are not affected. Used by the halt command

Emitted Events

Clock does not emit any built-in events.

Last Updated: 10/19/26, 3:04 PM
Contributors: Luke Morrison, lukejamesmorrison, Copilot
Prev
Block Catalogue
Next
Command Bus