diff options
author | Simon Howard | 2006-04-06 20:49:16 +0000 |
---|---|---|
committer | Simon Howard | 2006-04-06 20:49:16 +0000 |
commit | 197188e1f1b62e476978816a498270a0d95d207a (patch) | |
tree | 14a86b32a6b44e92c60e6040bac42b1276f057fb /src | |
parent | d5f0ddc20b192cf1f17b27347dd467cddf493a6d (diff) | |
download | chocolate-doom-197188e1f1b62e476978816a498270a0d95d207a.tar.gz chocolate-doom-197188e1f1b62e476978816a498270a0d95d207a.tar.bz2 chocolate-doom-197188e1f1b62e476978816a498270a0d95d207a.zip |
Debug code for tracking bandwidth usage
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 465
Diffstat (limited to 'src')
-rw-r--r-- | src/net_sdl.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/net_sdl.c b/src/net_sdl.c index 98730dd8..24be9627 100644 --- a/src/net_sdl.c +++ b/src/net_sdl.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_sdl.c 244 2006-01-02 20:11:49Z fraggle $ +// $Id: net_sdl.c 465 2006-04-06 20:49:16Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -210,6 +210,22 @@ static void NET_SDL_SendPacket(net_addr_t *addr, net_packet_t *packet) UDPpacket sdl_packet; IPaddress *ip = (IPaddress *) addr->handle; +#if 0 + { + static int this_second_sent = 0; + static int lasttime; + + this_second_sent += packet->len + 64; + + if (I_GetTime() - lasttime > 35) + { + printf("%i bytes sent in the last second\n", this_second_sent); + lasttime = I_GetTime(); + this_second_sent = 0; + } + } +#endif + sdl_packet.channel = 0; sdl_packet.data = packet->data; sdl_packet.len = packet->len; |