diff --git a/src/etcp_loadbalancer.c b/src/etcp_loadbalancer.c index 9d1285a..02b1db6 100644 --- a/src/etcp_loadbalancer.c +++ b/src/etcp_loadbalancer.c @@ -118,8 +118,8 @@ void etcp_loadbalancer_send(struct ETCP_DGRAM* dgram) { DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "[%s] unlimited bandwidth, skipping shaper update", etcp->log_name); // Don't return here, let the function continue to free dgram at the end } else { - // Time to transmit (ns per byte = 8e9 / bw for bits/sec) - double byte_time_ns = 8000000000.0 / (double)link->bandwidth; + // Time to transmit (ns per byte = 8e6 / bw for Kbits/sec) + double byte_time_ns = 8000000.0 / (double)link->bandwidth; uint64_t tx_time_ns = (uint64_t)(pkt_size * byte_time_ns + 0.5); // Round nearest // To sub_nanotime (*10 for 0.1ns)