diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index 19503170a..dad93b2a4 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -478,11 +478,11 @@ private: */ struct Information { - bool toMul; - bool fromMul; - int64_t factor; - int64x64_t timeTo; - int64x64_t timeFrom; + bool toMul; //!< Multiply when converting To, otherwise divide + bool fromMul; //!< Multiple when converting From, otherwise divide + int64_t factor; //!< Ratio of this unit / current unit + int64x64_t timeTo; //!< Multiplier to convert to this unit + int64x64_t timeFrom; //!< Multiplier to convert from this unit }; /** * Current time unit, and conversion info. diff --git a/src/core/model/time.cc b/src/core/model/time.cc index 0361da40d..17466d80a 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -65,7 +65,7 @@ bool Time::StaticInit () return firstTime; } - + Time::Time (const std::string& s) { NS_LOG_FUNCTION (this << &s); @@ -103,19 +103,19 @@ Time::Time (const std::string& s) } else { - NS_ABORT_MSG ("Can't Parse Time " << s); - } + NS_ABORT_MSG ("Can't Parse Time " << s); + } } else { - // they didn't provide units, assume seconds - std::istringstream iss; - iss.str (s); - double v; - iss >> v; - *this = Time::FromDouble (v, Time::S); -} - + // they didn't provide units, assume seconds + std::istringstream iss; + iss.str (s); + double v; + iss >> v; + *this = Time::FromDouble (v, Time::S); + } + if (g_markingTimes) { Mark (this);