12#define TIMESOURCE_GAMEPLAY uint32_t('GPTS')
13#define TIMESOURCE_INPUT uint32_t('IPTS')
14#define TIMESOURCE_SYSTEM uint32_t('SYTS')
These are the standard time source objects provided by Application layer:
Definition timesource.cc:13
TimeSource *const CreateTimeSource(TimeSourceCreateInfo const &info)
create a timesource. The global time manager handles the timesources.
Definition timesource.cc:113
void AdvanceTimeSource(TimeSource *timeSource, Timing::Time delta)
add time to the accumulator of a fixed time source.
Definition timesource.cc:208
void BeginFrame(Timing::Tick realFrameTicks)
advance every time source by the real frame time. A fixed source turns real time into available steps
Definition timesource.cc:155
void SetGlobalTimeFactor(float factor)
set global time scale. This should be used sparingly. You can usually set individual time sources tim...
Definition timesource.cc:137
void Setup()
setup the time sources. Called by Game::TimeManager on activate
Definition timesource.cc:92
bool ConsumeFixedStep(TimeSource *timeSource)
consume one fixed step from a fixed time source. Returns false when no steps are left
Definition timesource.cc:191
void Discard()
discard the time sources. Called by Game::TimeManager on deactivate
Definition timesource.cc:102
TimeSource *const GetTimeSource(uint32_t TIMESOURCE_HASH)
get a time source by hash
Definition timesource.cc:128
float GetGlobalTimeFactor()
get the global time scale
Definition timesource.cc:146
Game::EditorState.
Definition graphicsmanager.h:66
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
double Time
the time datatype
Definition time.h:18
Used to create a timesource.
Definition timesource.h:24
IndexT maxStepsPerFrame
how many fixed steps the source can accumulate per frame. Guards against the spiral of death
Definition timesource.h:30
uint32_t hash
time source hash number. Ex. 'ABC1'
Definition timesource.h:26
Timing::Time fixedFrameTime
when non-zero the time source advances in fixed steps instead of following real frame time
Definition timesource.h:28
An object that keeps track of running time and frame time (delta time).
Definition timesource.h:58
float timeFactor
time factor for this time source
Definition timesource.h:76
Timing::Time const fixedFrameTime
the fixed step this source advances by, 0 when the source follows real frame time
Definition timesource.h:66
Timing::Time const time
total time this timesource has run for
Definition timesource.h:62
IndexT const maxStepsPerFrame
max fixed steps available per frame
Definition timesource.h:72
int pauseCounter
increment this to pause time, decrement to continue running
Definition timesource.h:74
Timing::Time const accumulator
real time which has not been turned into a fixed step yet
Definition timesource.h:68
Timing::Time const frameTime
delta time between this frame and last frame. Always fixedFrameTime for a fixed time source
Definition timesource.h:60
IndexT const availableSteps
fixed steps available to run this frame
Definition timesource.h:70
Timing::Tick const ticks
number of ticks that this time source has run for
Definition timesource.h:64
Typedefs for the Timing subsystem.
int IndexT
Definition types.h:41