Remove unnecessary casts to double for hard-coded numbers
This commit is contained in:
@@ -56,13 +56,13 @@ Ptr<PacketSink> sink; //!< Pointer to the packet sink application
|
||||
uint64_t lastTotalRx = 0; //!< The value of the last total received bytes
|
||||
|
||||
/**
|
||||
* Calulate the throughput
|
||||
* Calculate the throughput
|
||||
*/
|
||||
void
|
||||
CalculateThroughput()
|
||||
{
|
||||
Time now = Simulator::Now(); /* Return the simulator's virtual time. */
|
||||
double cur = (sink->GetTotalRx() - lastTotalRx) * (double)8 /
|
||||
double cur = (sink->GetTotalRx() - lastTotalRx) * 8.0 /
|
||||
1e5; /* Convert Application RX Packets to MBits. */
|
||||
std::cout << now.GetSeconds() << "s: \t" << cur << " Mbit/s" << std::endl;
|
||||
lastTotalRx = sink->GetTotalRx();
|
||||
|
||||
Reference in New Issue
Block a user