aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-06 11:22:38 -0600
committermegamage <none@none>2009-01-06 11:22:38 -0600
commit290a187592d28cbfd9639ded43663077711f3379 (patch)
tree057897fa3648080c2145f36f7d931f323a03290d /src
parent587dc874044a881f8e290109fed74dc836b8146f (diff)
*Record difftime as ms rather than s.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/World.cpp6
-rw-r--r--src/game/World.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp
index d632c0b6ad1..ee40587e1bf 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 6a224715cb4..3bf979b7cac 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<uint32, Weather*> WeatherMap;