Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

profiler.watch

A frame-time watchdog: set a ceiling, run the scene, and the engine catches the bad frames for you. watch(50) records every frame whose EFFECTIVE time (the agent's own execute cost excluded) is at or above 50ms; watch(50, "pause") instead pauses gameplay the instant one crosses the ceiling, freezing the bad state for inspection (then read it with retro). watch("off") disarms, watch("status") reports state and hit count, and the hits tool reviews what record mode caught. It runs inside the engine's per-frame hook, so it is frame-accurate and immune to the very stalls it watches for — unlike an agent poll, which always lands seconds late. Editor profile only: a shipped runtime can't pause, so it is a no-op there.