TimeManager
Time.h

TimeManager

Handles access to high precision timers and time related functions
Description
The time manager gives the user access to an arbitrary number of timers, which can either be
count down or count up timers. Count down timers can be created specifying an optional callback function
to be run when the timer hits zero. Either type of timer may be queried at any point to determine
its current time value. The time manager also provides additional functions to return the local
time and date as a string (in a format specified by the designer using a format string). Finally,
the time manager provides functions for an in-game clock, allowing the clock to be set, stopped,
started, moved forward, and scaled with respect to real time. Note that the game clock should not
be used as a timer, as it is limited to second precision (the game clock is meant to be used as a clock).
The time manager is accessed through the globally defined value TimeMgr.
Definition
class TimeManager
Contructor
TimeManager();
Member Functions
TimeManager::CreateCountUpTimerCreates a new Count Up timer.
TimeManager::CreateCountDownTimerCreates a new Count Down timer.
TimeManager::DeleteTimerDestroys a timer.
TimeManager::StartTimerStarts a timer.
TimeManager::StopTimerStops a timer.
TimeManager::ResetTimerResets a timer.
TimeManager::QueryTimerQueries a timer for its current value.
TimeManager::GetLocalTimeReturns a time string based on the local machine's time.
TimeManager::GetGameTimeReturns a time string based on the application's internal time.
TimeManager::SetGameClockDateSets the current in-game date.
TimeManager::SetGameClockTimeSets the current in-game time.
TimeManager::StartGameClockStarts the game clock.
TimeManager::StopGameClockStops the game clock.
TimeManager::SetGameClockScaleSets the game clock to real time ratio.
TimeManager::AddGameClockOffsetAdjusts the game clock foward by the given number of seconds.