Replaced time(NULL) on sGameTime.GetGameTime() this is used for better performance.

Original Timer.h divided into 2 parts. Shared project has no need to know about GameTime Singleton.
2 Identical structures with different types are now replaced with one generic templated structure and 2 typedefs.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-23 08:04:10 +01:00
parent 7ea2510980
commit 3fe0bc5254
51 changed files with 352 additions and 364 deletions
+1 -7
View File
@@ -26,7 +26,7 @@
#define __WORLD_H
#include "Common.h"
#include "Timer.h"
#include "TimeMgr.h"
#include "Policies/Singleton.h"
#include "SharedDefines.h"
#include "ace/Atomic_Op.h"
@@ -516,12 +516,6 @@ class World
/// Get the path where data (dbc, maps) are stored on disk
std::string GetDataPath() const { return m_dataPath; }
/// When server started?
time_t const& GetStartTime() const { return m_startTime; }
/// What time is it?
time_t const& GetGameTime() const { return m_gameTime; }
/// Uptime (in secs)
uint32 GetUptime() const { return uint32(m_gameTime - m_startTime); }
/// Update time
uint32 GetUpdateTime() const { return m_updateTime; }
void SetRecordDiffInterval(int32 t) { if(t >= 0) m_configs[CONFIG_INTERVAL_LOG_UPDATE] = (uint32)t; }