1
This commit is contained in:
1 parent
59ed38d8f9
commit
dee62e7ad0
1 file changed
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user