Nebula
Loading...
Searching...
No Matches
Game::TimeSource Struct Reference

#include <timemanager.h>

Detailed Description

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.

Note
You should never create TimeSources by using new. Instead, use Game::Time::CreateTimeSource.
Todo
These are currently not thread safe.
See also
Game::Time::CreateTimeSource
Game::Time::GetTimeSource

Public Attributes

Timing::Time const frameTime
 delta time between this frame and last frame
 
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
 
int pauseCounter
 increment this to pause time, decrement to continue running
 
float timeFactor
 time factor for this time source
 

Member Data Documentation

◆ frameTime

Timing::Time const Game::TimeSource::frameTime

delta time between this frame and last frame

◆ pauseCounter

int Game::TimeSource::pauseCounter

increment this to pause time, decrement to continue running

◆ ticks

Timing::Tick const Game::TimeSource::ticks

number of ticks that this time source has run for

◆ time

Timing::Time const Game::TimeSource::time

total time this timesource has run for

◆ timeFactor

float Game::TimeSource::timeFactor

time factor for this time source


The documentation for this struct was generated from the following file: