diff --git a/src/game/World.cpp b/src/game/World.cpp index d632c0b6ad..ee40587e1b 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1424,8 +1424,8 @@ void World::RecordTimeDiff(const char *text) return; sLog.outDebugInLine("Difftime "); sLog.outDebugInLine(text); - time_t thisTime = time(NULL); - sLog.outDebug(": %u.", uint32(thisTime - m_currentTime)); + uint32 thisTime = getMSTime(); + sLog.outDebug(": %u.", getMSTimeDiff(m_currentTime, thisTime)); m_currentTime = thisTime; } @@ -1440,7 +1440,7 @@ void World::Update(time_t diff) sLog.outString("Update time diff: %u. Players online: %u.", m_updateTimeSum / m_updateTimeCount, GetActiveSessionCount()); m_updateTimeSum = m_updateTime; m_updateTimeCount = 1; - m_currentTime = time(NULL); + m_currentTime = getMSTime(); } else { diff --git a/src/game/World.h b/src/game/World.h index 6a224715cb..3bf979b7ca 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -538,7 +538,7 @@ class World uint32 mail_timer_expires; uint32 m_updateTime, m_updateTimeSum; uint32 m_updateTimeCount; - time_t m_currentTime; + uint32 m_currentTime; void RecordTimeDiff(const char * text); typedef UNORDERED_MAP WeatherMap;