diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index 01765ef7d..a93cde05a 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -1138,8 +1138,8 @@ RoutingProtocol::GetSettlingTime (Ipv4Address address) { NS_LOG_DEBUG ("Route SettlingTime: " << mainrt.GetSettlingTime ().GetSeconds () << " and LifeTime:" << mainrt.GetLifeTime ().GetSeconds ()); - weightedTime = Time ((m_weightedFactor * mainrt.GetSettlingTime () + 1.0 - m_weightedFactor) - * mainrt.GetLifeTime ()); + weightedTime = Time (m_weightedFactor * mainrt.GetSettlingTime ().GetSeconds() + (1.0 - m_weightedFactor) + * mainrt.GetLifeTime ().GetSeconds()); NS_LOG_DEBUG ("Calculated weightedTime:" << weightedTime.GetSeconds ()); return weightedTime; }