Skip to content
Konjure / spatial intelligence

tick

← Builtin reference

The accepted simulation tick number inside a system lifecycle callback.

Signature

tick: Number

tick is an immutable Number supplied by the runtime. It counts accepted simulation updates; browser animation frames and rejected updates do not increment it. It is available only inside init, frame and done callbacks.

Examples

Count accepted updates

Step twice to log 1 and 2. Reset starts a fresh run.

Press Step 2 times to reach the checked result.

Tick 0 · 0.00 sThis device
main.kj⌘ / Ctrl + Enter
Loading the language runtime…
Output 0
No output.
Expected output
1
2

Rust definition

Machine exposes its accepted tick counter as Value::Number.

See also