summaryrefslogtreecommitdiffstats
path: root/src/game-server/main-game.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-11-19 13:36:50 +0000
committerDavid Athay <ko2fan@gmail.com>2008-11-19 15:02:10 +0000
commit8481413ea17177945d3d280b1518eb6f1f25cd5d (patch)
tree77ed689d7587a6d06c07dd81c3ca0d5c49b3284d /src/game-server/main-game.cpp
parent751cc20a3be820724ca575aab32c2bb424f89a5b (diff)
downloadmanaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.tar.gz
manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.tar.xz
manaserv-8481413ea17177945d3d280b1518eb6f1f25cd5d.zip
Added bandwidth monitoring
Diffstat (limited to 'src/game-server/main-game.cpp')
-rw-r--r--src/game-server/main-game.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index 0bf088b..40b9935 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -311,9 +311,13 @@ int main(int argc, char *argv[])
// Handle all messages that are in the message queues
accountHandler->process();
- if (worldTime % 100 == 0)
+ if (worldTime % 300 == 0)
{
accountHandler->sendStatistics();
+ LOG_INFO("Total Account Output: " << accountHandler->totalOut() << " Bytes");
+ LOG_INFO("Total Account Input: " << accountHandler->totalIn() << " Bytes");
+ LOG_INFO("Total Client Output: " << gameHandler->calculateTotalOut() << " Bytes");
+ LOG_INFO("Total Client Input: " << gameHandler->calculateTotalIn() << " Bytes");
}
}
else
@@ -325,7 +329,7 @@ int main(int argc, char *argv[])
}
gameHandler->process();
// Update all active objects/beings
- GameState::update();
+ GameState::update(worldTime);
// Send potentially urgent outgoing messages
gameHandler->flush();
}