TrinityCore
GameTime Namespace Reference

Functions

time_t GetStartTime ()
 
time_t GetGameTime ()
 
uint32 GetGameTimeMS ()
 
SystemTimePoint GetSystemTime ()
 Current chrono system_clock time point. More...
 
TimePoint Now ()
 Current chrono steady_clock time point. More...
 
template<typename Clock >
Clock::time_point GetTime ()
 Current chrono Clock time point. More...
 
template<>
TC_GAME_API SystemTimePoint GetTime< std::chrono::system_clock > ()
 
template<>
TC_GAME_API TimePoint GetTime< std::chrono::steady_clock > ()
 
uint32 GetUptime ()
 Uptime (in secs) More...
 
tm const * GetDateAndTime ()
 
WowTime const * GetUtcWowTime ()
 
WowTime const * GetWowTime ()
 
void UpdateGameTimers ()
 

Variables

time_t const StartTime = time(nullptr)
 
time_t GameTime = time(nullptr)
 
uint32 GameMSTime = 0
 
SystemTimePoint GameTimeSystemPoint = SystemTimePoint::min()
 
TimePoint GameTimeSteadyPoint = TimePoint::min()
 
tm DateTime
 
WowTime UtcWow
 
WowTime Wow
 

Function Documentation

◆ GetDateAndTime()

TC_GAME_API tm const * GameTime::GetDateAndTime ( )

Definition at line 87 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetGameTime()

TC_GAME_API time_t GameTime::GetGameTime ( )

Definition at line 44 of file GameTime.cpp.

◆ GetGameTimeMS()

TC_GAME_API uint32 GameTime::GetGameTimeMS ( )

Definition at line 49 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetStartTime()

TC_GAME_API time_t GameTime::GetStartTime ( )

Definition at line 39 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetSystemTime()

TC_GAME_API SystemTimePoint GameTime::GetSystemTime ( )

Current chrono system_clock time point.

Definition at line 54 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetTime()

template<typename Clock >
Clock::time_point GameTime::GetTime ( )

Current chrono Clock time point.

Definition at line 65 of file GameTime.cpp.

◆ GetTime< std::chrono::steady_clock >()

template<>
TC_GAME_API TimePoint GameTime::GetTime< std::chrono::steady_clock > ( )

Definition at line 77 of file GameTime.cpp.

+ Here is the call graph for this function:

◆ GetTime< std::chrono::system_clock >()

template<>
TC_GAME_API SystemTimePoint GameTime::GetTime< std::chrono::system_clock > ( )

Definition at line 71 of file GameTime.cpp.

+ Here is the call graph for this function:

◆ GetUptime()

TC_GAME_API uint32 GameTime::GetUptime ( )

Uptime (in secs)

Definition at line 82 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetUtcWowTime()

TC_GAME_API WowTime const * GameTime::GetUtcWowTime ( )

Definition at line 92 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ GetWowTime()

TC_GAME_API WowTime const * GameTime::GetWowTime ( )

Definition at line 97 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ Now()

TC_GAME_API TimePoint GameTime::Now ( )

Current chrono steady_clock time point.

Definition at line 59 of file GameTime.cpp.

+ Here is the caller graph for this function:

◆ UpdateGameTimers()

void GameTime::UpdateGameTimers ( )

Definition at line 102 of file GameTime.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DateTime

tm GameTime::DateTime

Definition at line 34 of file GameTime.cpp.

◆ GameMSTime

uint32 GameTime::GameMSTime = 0

Definition at line 29 of file GameTime.cpp.

◆ GameTime

time_t GameTime::GameTime = time(nullptr)

Definition at line 28 of file GameTime.cpp.

◆ GameTimeSteadyPoint

TimePoint GameTime::GameTimeSteadyPoint = TimePoint::min()

Definition at line 32 of file GameTime.cpp.

◆ GameTimeSystemPoint

SystemTimePoint GameTime::GameTimeSystemPoint = SystemTimePoint::min()

Definition at line 31 of file GameTime.cpp.

◆ StartTime

time_t const GameTime::StartTime = time(nullptr)

Definition at line 26 of file GameTime.cpp.

◆ UtcWow

WowTime GameTime::UtcWow

Definition at line 36 of file GameTime.cpp.

◆ Wow

WowTime GameTime::Wow

Definition at line 37 of file GameTime.cpp.