45 if (multiplier < 0.0) {
46 throw NotSupported(
"Negative time multiplier are not supported");
74 return static_cast<uint32_t>(
static_cast<float>(ticks) * multiplier);
Timeprovider is an utility providing time management functionality You can have hierarchy of time pro...
void setMultiplier(float multiplier)
With multiplier, you can adjust the time speed.
double getPreciseGameTime() const
Returns current game ticks, already scaled, more precise.
TimeProvider(TimeProvider *master)
Constructor In case there there is no provider master, you can use NULL.
static TimeManager * instance()
uint32_t getTime() const
Get the time.
float getMultiplier() const
uint32_t getGameTime() const
Returns current game ticks, already scaled.
uint32_t scaleTime(float multiplier, uint32_t ticks)
Utility function to calculate time scaling.
float getTotalMultiplier() const