From 197188e1f1b62e476978816a498270a0d95d207a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 6 Apr 2006 20:49:16 +0000 Subject: Debug code for tracking bandwidth usage Subversion-branch: /trunk/chocolate-doom Subversion-revision: 465 --- src/net_sdl.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3