Remove unnecessary casts to double for hard-coded numbers

This commit is contained in:
Eduardo Almeida
2022-12-05 22:43:18 +00:00
parent b72e7b234e
commit e3c5c9831a
8 changed files with 30 additions and 30 deletions

View File

@@ -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();