> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: globals
description: Read-only game globals such as curtime and tickcount
icon: clock
---

The `globals` namespace exposes read-only timing and connection state from the game engine.

<Info>
  All `globals` values are **read-only** and refreshed by the engine every frame.
</Info>

## Fields

<Schema>
  <SchemaField name="globals.curtime" type="number">
    Server time in seconds.
  </SchemaField>

  <SchemaField name="globals.realtime" type="number">
    Local time in seconds.
  </SchemaField>

  <SchemaField name="globals.frametime" type="number">
    Duration of the last game frame in seconds.
  </SchemaField>

  <SchemaField name="globals.absoluteframetime" type="number">
    Duration of the last game frame in seconds.
  </SchemaField>

  <SchemaField name="globals.framecount" type="number">
    Amount of frames since the game started.
  </SchemaField>

  <SchemaField name="globals.tickcount" type="number">
    Number of ticks elapsed on the server.
  </SchemaField>

  <SchemaField name="globals.tickinterval" type="number">
    Duration of a tick in seconds.
  </SchemaField>

  <SchemaField name="globals.max_players" type="number">
    Maximum number of players on the server.
  </SchemaField>

  <SchemaField name="globals.is_connected" type="boolean">
    `true` if the player is connected, but not necessarily active in game (could still be loading).
  </SchemaField>

  <SchemaField name="globals.is_in_game" type="boolean">
    `true` if the player is currently connected to a game server.
  </SchemaField>

  <SchemaField name="globals.choked_commands" type="number">
    Number of choked commands.
  </SchemaField>

  <SchemaField name="globals.commandack" type="number">
    Current command number acknowledged by the server.
  </SchemaField>

  <SchemaField name="globals.commandack_prev" type="number">
    Sequence number of the last outgoing command.
  </SchemaField>

  <SchemaField name="globals.last_outgoing_command" type="number">
    Number of the last command sequence number acknowledged by the server.
  </SchemaField>

  <SchemaField name="globals.server_tick" type="number">
    Last-received tick from the server.
  </SchemaField>

  <SchemaField name="globals.client_tick" type="number">
    The client's own tick count.
  </SchemaField>

  <SchemaField name="globals.delta_tick" type="number">
    Last-valid received snapshot (server) tick.
  </SchemaField>

  <SchemaField name="globals.clock_offset" type="number">
    Difference between the server and client tick counts, used to predict the current server tick count.
  </SchemaField>
</Schema>
