summaryrefslogtreecommitdiff
path: root/src/net/tmwa/network.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-06 21:13:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-07 12:46:08 +0300
commitd812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch)
tree7f9619d23a44202a76282849bb1284773302309f /src/net/tmwa/network.cpp
parent1bcaac517036751a8fee9ff3d6561f5866e6969e (diff)
downloadManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz
ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2
ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz
ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r--src/net/tmwa/network.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index c8c28e0d2..e7e336d2d 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -135,6 +135,7 @@ void Network::clearHandlers()
void Network::dispatchMessages()
{
+ BLOCK_START("Network::dispatchMessages")
while (messageReady())
{
MessageIn *const msg = getNextMessage();
@@ -158,6 +159,7 @@ void Network::dispatchMessages()
skip(msg->getLength());
delete msg;
}
+ BLOCK_END("Network::dispatchMessages")
}
bool Network::messageReady()
@@ -197,6 +199,7 @@ bool Network::messageReady()
MessageIn *Network::getNextMessage()
{
+ BLOCK_START("Network::getNextMessage")
while (!messageReady())
{
if (mState == NET_ERROR)
@@ -224,6 +227,7 @@ MessageIn *Network::getNextMessage()
MessageIn *const msg = new MessageIn(mInBuffer, len);
SDL_mutexV(mMutex);
+ BLOCK_END("Network::getNextMessage")
return msg;
}