IUpdateableFrameTime

Description

interface Tinman.Engine.Application.IUpdateableFrameTime

Base interface for classes that are updated periodically, once per application loop cycle.

Public / Methods

UpdateFrameTime


public method UpdateFrameTime → (1)

time in : float32

[>0]
The amount of time that has elapsed since the last frame, in seconds.

returns → bool

true if the object needs to be presented again, false if the current presentation is still valid.

This method is called once per application frame.

The given time in delta may be used to accumulate the total time since the first frame, using a 64-bit floating point variable for the sum:

float time;
double sum;
...
time = ...;  // Frame time since the last frame
...
sum += time; // Accumulate total frame time since first frame

When using the ApplicationLoop class, the accumulated total time can be queried with ApplicationLoop.TimeIndex.