wifi: use Time::IsPositive

This commit is contained in:
Alexander Krotov
2018-09-06 12:00:31 +03:00
parent 66ce420f42
commit d2b32d98ac

View File

@@ -125,7 +125,7 @@ WifiRadioEnergyModel::GetTotalEnergyConsumption (void) const
NS_LOG_FUNCTION (this);
Time duration = Simulator::Now () - m_lastUpdateTime;
NS_ASSERT (duration.GetNanoSeconds () >= 0); // check if duration is valid
NS_ASSERT (duration.IsPositive ()); // check if duration is valid
// energy to decrease = current * voltage * time
double supplyVoltage = m_source->GetSupplyVoltage ();