StringTune/Docs

API Reference

TimeState

Internal model for current frame time, delta, previous timestamp, and total elapsed time.

TimeState

TimeState holds frame timing data.

Public status

TimeState lives in src/states and is mainly runtime reference. Most integrations should read it through exported StringData.

Fields

  • now
  • previous
  • delta
  • elapsed

What it is for

This state is useful for:

  • time-based animation logic
  • frame-rate-aware behavior
  • duration-dependent custom modules

Practical note

If a custom module needs time but should stay inside the runtime model, use data.time instead of creating a separate loop clock.