X-Git-Url: https://git.sesse.net/?p=jam;a=blobdiff_plain;f=jam.c;h=1f2aedcf5d4d1855b3bade5776c997dbc2238a64;hp=5faf0379d4b7eb13299dd48595641d935e6e409a;hb=6d92e1c84d49fdb3d785d7ffd2bad68ea39398ca;hpb=2f5350f30cbfeebde0bd287d16fb118639536493 diff --git a/jam.c b/jam.c index 5faf037..1f2aedc 100644 --- a/jam.c +++ b/jam.c @@ -13,6 +13,7 @@ #include unsigned short port = 2007; +unsigned update_frequency = 1048576; struct in_addr *destinations = NULL; unsigned num_destinations = 0; @@ -263,7 +264,7 @@ void *sender_worker(void *arg) // update the central counter after every 1MB (8ms // at gigabit speeds, should be enough) of sent data - if (bytes_sent > 1048576) { + if (bytes_sent > update_frequency) { pthread_mutex_lock(&send_mutex); total_bytes_sent += bytes_sent; pthread_mutex_unlock(&send_mutex); @@ -307,7 +308,7 @@ void *receiver_worker(void *arg) // update the central counter after every 1MB (8ms // at gigabit speeds, should be enough) of received data - if (bytes_received > 1048576) { + if (bytes_received > update_frequency) { pthread_mutex_lock(&receive_mutex); total_bytes_received += bytes_received; pthread_mutex_unlock(&receive_mutex);