The accepted simulation tick number inside a system lifecycle callback.
Signature
tick: Numbertick 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.
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
1 2
Rust definition
Machine exposes its accepted tick counter as Value::Number.
View Rust documentation →Support: runtime