|
Nebula
|
#include <timesource.h>
An object that keeps track of running time and frame time (delta time).
Each time source tracks its own time independently from the other time sources, they can also be paused and unpaused independentlty from each other, and they may also run faster or slower then realtime.
A time source created with a fixed frame time does not follow realtime. It accumulates real time and turns it into whole steps of fixedFrameTime, and frameTime is then always that step. The steps are consumed by Game::Time::ConsumeFixedStep, which is what a fixed frame event in the frame pipeline runs on.
Public Attributes | |
| Timing::Time const | frameTime |
| delta time between this frame and last frame. Always fixedFrameTime for a fixed time source | |
| Timing::Time const | time |
| total time this timesource has run for | |
| Timing::Tick const | ticks |
| number of ticks that this time source has run for | |
| Timing::Time const | fixedFrameTime |
| the fixed step this source advances by, 0 when the source follows real frame time | |
| Timing::Time const | accumulator |
| real time which has not been turned into a fixed step yet | |
| IndexT const | availableSteps |
| fixed steps available to run this frame | |
| IndexT const | maxStepsPerFrame |
| max fixed steps available per frame | |
| int | pauseCounter |
| increment this to pause time, decrement to continue running | |
| float | timeFactor |
| time factor for this time source | |
| Timing::Time const Game::TimeSource::accumulator |
real time which has not been turned into a fixed step yet
| IndexT const Game::TimeSource::availableSteps |
fixed steps available to run this frame
| Timing::Time const Game::TimeSource::fixedFrameTime |
the fixed step this source advances by, 0 when the source follows real frame time
| Timing::Time const Game::TimeSource::frameTime |
delta time between this frame and last frame. Always fixedFrameTime for a fixed time source
| IndexT const Game::TimeSource::maxStepsPerFrame |
max fixed steps available per frame
| int Game::TimeSource::pauseCounter |
increment this to pause time, decrement to continue running
| Timing::Tick const Game::TimeSource::ticks |
number of ticks that this time source has run for
| Timing::Time const Game::TimeSource::time |
total time this timesource has run for
| float Game::TimeSource::timeFactor |
time factor for this time source