> ## Documentation Index
> Fetch the complete documentation index at: https://lua.starline.one/llms.txt
> Use this file to discover all available pages before exploring further.

# CGlobalVars

> Read live engine timing and frame state from the global variables object.

The `globals` object. Read-only, always live.

```lua theme={"dark"}
events.On("paint", function()
    local pulse = math.sin(globals.GetRealTime() * 4) * 0.5 + 0.5
end)
```

## GetRealTime

```lua theme={"dark"}
local t = globals.GetRealTime()
```

Real time in seconds. Keeps running in the menu.

## GetCurTime

```lua theme={"dark"}
local t = globals.GetCurTime()
```

Game time, in seconds. Frozen out of game.

## GetFrameTime

```lua theme={"dark"}
local dt = globals.GetFrameTime()
```

Seconds since the last frame.

## GetTickCount

```lua theme={"dark"}
local tick = globals.GetTickCount()
```

Global tick counter.

## GetMaxClients

```lua theme={"dark"}
local max = globals.GetMaxClients()
```

## GetFrameCount

```lua theme={"dark"}
local frame = globals.GetFrameCount()
```

Total frames rendered.
