当我编译以下代码片段并启用优化时
double bitrate = 8 * m_totBytes /(Simulator :: Now() - m_startTime)。GetSeconds();double instBitrate = 8 * message.GetSize()/(…
既然你没有使用那个变量,那么为什么不这样做:
NS_LOG_INFO("------RECEIVED: " << message.GetSize() << " Bitrate = " << (8 * m_totBytes / (Simulator::Now() - m_startTime).GetSeconds()) << " instBit = " << instBitrate << " normBit = " << normBitrate);