Delta Time
The engine provides frame-independent timing through native C++ (glfwGetTime), exposed to C# via P/Invoke.
Usage
Update the timer each frame and read delta time:
Then use world.DeltaTime in your systems for frame-independent movement:
API
Why Native Timing?
Delta time is computed in C++ using glfwGetTime() rather than C#'s Stopwatch because:
- GLFW's timer is tied to the same clock as the event loop
- Avoids overhead of crossing the P/Invoke boundary for high-frequency timing
- Consistent with how other native systems (input, rendering) measure time