keep track of time unit. More...
#include <nstime.h>
Classes | |
struct | Information |
struct | Resolution |
Public Types | |
enum | Unit { S = 0, MS = 1, US = 2, NS = 3, PS = 4, FS = 5, LAST = 6 } |
Public Member Functions | |
Time () | |
Time (const Time &o) | |
Time (double v) | |
Time (int v) | |
Time (long int v) | |
Time (long long int v) | |
Time (unsigned int v) | |
Time (unsigned long int v) | |
Time (unsigned long long int v) | |
Time (const std::string &s) | |
String constructor Construct Time object from common time expressions like "
1ms" or "10s". Supported units include: | |
Time (const int64x64_t &value) | |
int | Compare (const Time &o) const |
double | GetDouble (void) const |
int64_t | GetFemtoSeconds (void) const |
int64_t | GetInteger (void) const |
int64_t | GetMicroSeconds (void) const |
int64_t | GetMilliSeconds (void) const |
int64_t | GetNanoSeconds (void) const |
int64_t | GetPicoSeconds (void) const |
double | GetSeconds (void) const |
int64_t | GetTimeStep (void) const |
bool | IsNegative (void) const |
bool | IsPositive (void) const |
bool | IsStrictlyNegative (void) const |
bool | IsStrictlyPositive (void) const |
bool | IsZero (void) const |
operator int64x64_t () const | |
Time & | operator= (const Time &o) |
int64x64_t | To (enum Unit timeUnit) const |
double | ToDouble (enum Unit timeUnit) const |
int64_t | ToInteger (enum Unit timeUnit) const |
Static Public Member Functions | |
static Time | From (const int64x64_t &from, enum Unit timeUnit) |
static Time | From (const int64x64_t &value) |
static Time | FromDouble (double value, enum Unit timeUnit) |
static Time | FromInteger (uint64_t value, enum Unit timeUnit) |
static enum Unit | GetResolution (void) |
static void | SetResolution (enum Unit resolution) |
Static Private Member Functions | |
static struct Resolution | GetNsResolution (void) |
static struct Information * | PeekInformation (enum Unit timeUnit) |
static struct Resolution * | PeekResolution (void) |
static void | SetResolution (enum Unit unit, struct Resolution *resolution) |
Private Attributes | |
int64_t | m_data |
Friends | |
Time | Abs (const Time &time) |
Time | Max (const Time &ta, const Time &tb) |
Time | Min (const Time &ta, const Time &tb) |
bool | operator!= (const Time &lhs, const Time &rhs) |
Time | operator+ (const Time &lhs, const Time &rhs) |
Time & | operator+= (Time &lhs, const Time &rhs) |
Time | operator- (const Time &lhs, const Time &rhs) |
Time & | operator-= (Time &lhs, const Time &rhs) |
bool | operator< (const Time &lhs, const Time &rhs) |
bool | operator<= (const Time &lhs, const Time &rhs) |
bool | operator== (const Time &lhs, const Time &rhs) |
bool | operator> (const Time &lhs, const Time &rhs) |
bool | operator>= (const Time &lhs, const Time &rhs) |
keep track of time unit.
This template class is used to keep track of the value of a specific time unit: the type TimeUnit<1> is used to keep track of seconds, the type TimeUnit<2> is used to keep track of seconds squared, the type TimeUnit<-1> is used to keep track of 1/seconds, etc.
This base class defines all the functionality shared by all these time unit objects: it defines all the classic arithmetic operators +, -, *, /, and all the classic comparison operators: ==, !=, <, >, <=, >=. It is thus easy to add, substract, or multiply multiple TimeUnit objects. The return type of any such arithmetic expression is always a TimeUnit object.
The ns3::uint64_t, ns3::Time, ns3::TimeSquare, and ns3::TimeInvert classes are aliases for the TimeUnit<0>, TimeUnit<1>, TimeUnit<2> and TimeUnit<-1> types respectively.
For example:
If you try to assign the result of an expression which does not match the type of the variable it is assigned to, you will get a compiler error. For example, the following will not compile:
You can also use the following non-member functions to manipulate any of these ns3::TimeUnit object:
keep track of time values and allow control of global simulation resolution
This class defines all the classic C++ arithmetic operators +, -, *, /, and all the classic comparison operators: ==, !=, <, >, <=, >=. It is thus easy to add, substract, or multiply multiple Time objects.
The ns3::uint64_t, ns3::TimeSquare, and ns3::TimeInvert classes are backward-compatibility aliases for ns3::Time.
For example:
You can also use the following non-member functions to manipulate any of these ns3::Time object:
This class also controls the resolution of the underlying time value . The default resolution is nanoseconds. That is, TimeStep (1).GetNanoSeconds () will return
If your resolution is X (say, nanoseconds) and if you create Time objects with a lower resolution (say, picoseconds), don't expect that this code will return 1: PicoSeconds (1).GetPicoSeconds (). It will most likely return 0 because the Time object has only 64 bits of fractional precision which means that PicoSeconds (1) is stored as a 64-bit aproximation of 1/1000 in the Time object. If you later multiply it again by the exact value 1000, the result is unlikely to be 1 exactly. It will be close to 1 but not exactly 1.
In general, it is thus a really bad idea to try to use time objects of a resolution higher than the global resolution controlled through Time::SetResolution. If you do need to use picoseconds, it's thus best to switch the global resolution to picoseconds to avoid nasty surprises.
Another important issue to keep in mind is that if you increase the global resolution, you also implicitely decrease the range of your simulation. i.e., the global simulation time is stored in a 64 bit integer whose interpretation will depend on the global resolution so, 2^64 picoseconds which is the maximum duration of your simulation if the global resolution is picoseconds is smaller than 2^64 nanoseconds which is the maximum duration of your simulation if the global resolution is nanoseconds.
Finally, don't even think about ever changing the global resolution after creating Time objects: all Time objects created before the call to SetResolution will contain values which are not updated to the new resolution. In practice, the default value for the attributes of many models is indeed calculated before the main function of the main program enters. Because of this, if you use one of these models (and it's likely), it's going to be hard to change the global simulation resolution in a way which gives reasonable results. This issue has been filed as bug 954 in the ns-3 bugzilla installation.
enum ns3::Time::Unit |
|
inline |
Definition at line 171 of file nstime.h.
Referenced by From(), and FromInteger().
|
explicit |
String constructor Construct Time object from common time expressions like " 1ms" or "10s". Supported units include:
There can be no white space between the numerical portion and the units. Any otherwise malformed string causes a fatal error to occur.
s | The string to parse into a Time |
Definition at line 37 of file time.cc.
References FromDouble(), FS, MS, NS, NS_ABORT_MSG, NS_LOG_FUNCTION, PS, S, and US.
|
inline |
Definition at line 403 of file nstime.h.
References ns3::Time::Information::fromMul, PeekInformation(), Time(), and ns3::Time::Information::timeFrom.
Referenced by ns3::FemtoSeconds(), FromDouble(), ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::NanoSeconds(), ns3::PicoSeconds(), and ns3::Seconds().
|
inlinestatic |
value | to convert into a Time object |
timeUnit | the unit of the value to convert |
Definition at line 388 of file nstime.h.
References From().
Referenced by ns3::RttMeanDeviation::Measurement(), ns3::Seconds(), and Time().
value | to convert into a Time object |
timeUnit | the unit of the value to convert |
This method interprets the input value according to the input unit and constructs a matching Time object.
Definition at line 347 of file nstime.h.
References ns3::Time::Information::factor, ns3::Time::Information::fromMul, PeekInformation(), and Time().
Referenced by ns3::FemtoSeconds(), ns3::MicroSeconds(), ns3::MilliSeconds(), ns3::NanoSeconds(), ns3::PicoSeconds(), and ns3::RttMeanDeviation::RetransmitTimeout().
|
inline |
|
inline |
Definition at line 303 of file nstime.h.
References FS, and ToInteger().
|
inline |
Definition at line 319 of file nstime.h.
References GetTimeStep().
|
inline |
Definition at line 279 of file nstime.h.
References ToInteger(), and US.
Referenced by ns3::dot11s::IeBeaconTiming::BeaconIntervalToU16(), ns3::WifiRemoteStationInfo::CalculateAveragingCoefficient(), ns3::TxDurationTest::CheckTxDuration(), ns3::dot11s::HwmpProtocol::GetActivePathLifetime(), ns3::NscTcpL4Protocol::gettime(), Ns3TcpStateTestCase::Ipv4L3Tx(), Ns3TcpLossTestCase::Ipv4L3Tx(), Ns3TcpInteroperabilityTestCase::Ipv4L3Tx(), ns3::MeshWifiInterfaceMac::Receive(), ns3::dot11s::HwmpProtocol::ReceivePreq(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::HwmpProtocol::SendProactivePreq(), ns3::ApWifiMac::SendProbeResp(), ns3::dot11s::PeerLink::SetBeaconInformation(), ns3::ApWifiMac::SetBeaconInterval(), ns3::dot11s::PeerLink::SetConfirmTimer(), ns3::WifiMacHeader::SetDuration(), ns3::dot11s::PeerLink::SetHoldingTimer(), ns3::dot11s::PeerLink::SetRetryTimer(), ns3::DcfManager::SetSlot(), ns3::dot11s::IeBeaconTiming::TimestampToU16(), ns3::dot11s::PeerManagementProtocol::TimeToTu(), ns3::MinstrelWifiManager::UpdateStats(), and ns3::PcapFileWrapper::Write().
|
inline |
Definition at line 271 of file nstime.h.
References MS, and ToInteger().
Referenced by ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity(), ns3::LteRlcTm::DoReportBufferStatus(), ns3::LteRlcUm::DoReportBufferStatus(), ns3::LteRlcAm::DoReportBufferStatus(), RttTestCase::DoRun(), ns3::LteSpectrumPhy::EndRxData(), ns3::TraceFadingLossModel::LoadTrace(), JakesPropagationExample::Next(), ns3::V4Ping::Receive(), ns3::LteUePhy::ReceiveLteControlMessageList(), ns3::aodv::RrepHeader::RrepHeader(), ns3::aodv::RrepHeader::SetHello(), ns3::aodv::RrepHeader::SetLifeTime(), ns3::UplinkSchedulerSimple::SetupServiceFlow(), ns3::UplinkSchedulerMBQoS::SetupServiceFlow(), ns3::UplinkSchedulerRtps::SetupServiceFlow(), and ns3::LteEnbPhy::StartSubFrame().
|
inline |
Definition at line 287 of file nstime.h.
References NS, and ToInteger().
Referenced by ns3::AcousticModemEnergyModel::ChangeState(), ns3::WifiRadioEnergyModel::ChangeState(), ns3::MacStatsCalculator::DlScheduling(), ns3::LteRlcTm::DoReceivePdu(), ns3::LteRlcUm::DoReceivePdu(), ns3::LteRlcAm::DoReceivePdu(), ns3::LtePdcp::DoReceivePdu(), ns3::LteRlcSm::DoReceivePdu(), TimeSimpleTestCase::DoRun(), SimulatorEventsTestCase::NowUs(), ns3::PhyStatsCalculator::ReportCurrentCellRsrpSinr(), ns3::PhyStatsCalculator::ReportInterference(), ns3::PhyStatsCalculator::ReportUeSinr(), ns3::MpiInterface::SendPacket(), ns3::RlcTag::Serialize(), ns3::PdcpTag::Serialize(), ns3::Synchronizer::TimeStepToNanosecond(), ns3::MacStatsCalculator::UlScheduling(), ns3::RadioBearerStatsCalculator::WriteDlResults(), and ns3::RadioBearerStatsCalculator::WriteUlResults().
|
staticreadprivate |
Definition at line 90 of file time.cc.
References NS, NS_LOG_FUNCTION_NOARGS, and SetResolution().
Referenced by PeekResolution().
|
inline |
Definition at line 295 of file nstime.h.
References PS, and ToInteger().
|
static |
Definition at line 140 of file time.cc.
References NS_LOG_FUNCTION_NOARGS, PeekResolution(), and ns3::Time::Resolution::unit.
Referenced by ns3::operator<<().
|
inline |
Definition at line 262 of file nstime.h.
References S, and ToDouble().
Referenced by ns3::dsr::RouteCache::AddRoute_Link(), ns3::AsciiPhyReceiveSinkWithContext(), ns3::AsciiPhyReceiveSinkWithoutContext(), ns3::AsciiPhyRxOkEvent(), ns3::AsciiPhyTransmitSinkWithContext(), ns3::AsciiPhyTransmitSinkWithoutContext(), ns3::AsciiPhyTxEvent(), ns3::WimaxHelper::AsciiRxEvent(), ns3::WimaxHelper::AsciiTxEvent(), ns3::UanPhyCalcSinrFhFsk::CalcSinrDb(), ns3::InterferenceHelper::CalculateChunkSuccessRate(), ns3::SimpleOfdmWimaxPhy::CalculateDataRate(), ns3::DistributedSimulatorImpl::CalculateLookAhead(), ns3::BasicEnergySource::CalculateRemainingEnergy(), ns3::LiIonEnergySource::CalculateRemainingEnergy(), Bench::Cb(), ns3::AcousticModemEnergyModel::ChangeState(), ns3::WifiRadioEnergyModel::ChangeState(), ns3::UplinkSchedulerMBQoS::CheckDeadline(), CheckQueueSize(), ns3::LteX2HandoverTestCase::CheckStatsAWhileAfterHandover(), ns3::UanMacRcGw::ComputeAlpha(), ns3::UanMacRcGw::ComputeExpS(), BatteryLifetimeTest::ConstantLoadTest(), ns3::Ns2MobilityHelperTest::CourseChange(), ns3::WaypointMobilityModelNotifyTest::CourseChangeCallback(), ns3::AnimationInterface::CsmaPhyTxEndTrace(), Ns3TcpLossTestCase::CwndTracer(), ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(), ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(), ns3::AsciiTraceHelper::DefaultDropSinkWithContext(), ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(), ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(), ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(), ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(), ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(), ns3::AnimationInterface::DevTxTrace(), ns3::TraceFadingLossModel::DoCalcRxPowerSpectralDensity(), ns3::SimpleOfdmWimaxPhy::DoGetFrameDurationCode(), ns3::SimpleOfdmWimaxPhy::DoGetNrBytes(), ns3::SimpleOfdmWimaxPhy::DoGetNrSymbols(), ns3::dot11s::HwmpProtocol::DoInitialize(), ns3::MeshWifiInterfaceMac::DoInitialize(), ns3::LteHandoverDelayTestCase::DoRun(), TimesWithSignsTestCase::DoRun(), ns3::SimpleOfdmWimaxPhy::DoSetPhyParameters(), ns3::RandomWalk2dMobilityModel::DoWalk(), ns3::GaussMarkovMobilityModel::DoWalk(), ns3::TcpWestwood::DupAck(), ns3::LteHandoverDelayTestCase::EnbHandoverEndOkCallback(), ns3::LteTestSinrChunkProcessor::End(), ns3::LteCtrlSinrChunkProcessor::End(), ns3::LteDataSinrChunkProcessor::End(), ns3::LteRsReceivedPowerChunkProcessor::End(), ns3::LteInterferencePowerChunkProcessor::End(), ns3::BaseStationNetDevice::EndDlSubFrame(), ns3::BaseStationNetDevice::EndUlSubFrame(), ns3::UanMacCw::Enqueue(), ns3::TcpWestwood::EstimateBW(), ns3::ShannonSpectrumErrorModel::EvaluateChunk(), ns3::LteTestSinrChunkProcessor::EvaluateSinrChunk(), ns3::LteCtrlSinrChunkProcessor::EvaluateSinrChunk(), ns3::LteDataSinrChunkProcessor::EvaluateSinrChunk(), ns3::LteRsReceivedPowerChunkProcessor::EvaluateSinrChunk(), ns3::LteInterferencePowerChunkProcessor::EvaluateSinrChunk(), ExampleFunction(), ns3::dsr::RouteCache::FindSameRoute(), ns3::SpectrumAnalyzer::GenerateReport(), GenerateTraffic(), ns3::UanMacRcGw::GetExpPdk(), ns3::dsdv::RoutingProtocol::GetSettlingTime(), ns3::JakesProcess::Oscillator::GetValueAt(), ns3::AnimationInterface::GetXMLOpenClose_linkupdate(), ns3::AnimationInterface::GetXMLOpenClose_nodeupdate(), ns3::AnimationInterface::GetXMLOpenClose_routing(), ns3::AnimationInterface::GetXMLOpenClose_rp(), MyModel::HandleEvent(), DynamicGlobalRoutingTestCase::HandleRead(), ns3::dsr::RouteCache::IncStability(), ns3::RedQueue::InitializeParams(), ns3::SubscriberStationNetDevice::InitSubscriberStationNetDevice(), ns3::aodv::RoutingTableEntry::Invalidate(), ns3::Ipv4L3ProtocolDropSinkWithContext(), ns3::Ipv4L3ProtocolDropSinkWithoutContext(), ns3::Ipv4L3ProtocolRxSinkWithContext(), ns3::Ipv4L3ProtocolRxSinkWithoutContext(), ns3::Ipv4L3ProtocolTxSinkWithContext(), ns3::Ipv4L3ProtocolTxSinkWithoutContext(), ns3::Ipv6L3ProtocolDropSinkWithContext(), ns3::Ipv6L3ProtocolDropSinkWithoutContext(), ns3::Ipv6L3ProtocolRxSinkWithContext(), ns3::Ipv6L3ProtocolRxSinkWithoutContext(), ns3::Ipv6L3ProtocolTxSinkWithContext(), ns3::Ipv6L3ProtocolTxSinkWithoutContext(), ns3::ArpCache::Entry::IsExpired(), ns3::olsr::RoutingProtocol::LinkSensing(), main(), ns3::aodv::RoutingTable::MarkLinkAsUnidirectional(), ns3::BaseStationNetDevice::MarkUplinkAllocations(), modify(), ns3::UanMacCw::NotifyTxStart(), ns3::operator*(), ns3::operator<<(), ns3::SSLinkManager::PerformBackoff(), ns3::SeqTsHeader::Print(), ns3::UanHeaderRcData::Print(), ns3::UanHeaderRcRts::Print(), ns3::dsdv::RoutingTableEntry::Print(), ns3::UanHeaderRcCtsGlobal::Print(), ns3::UanHeaderRcCts::Print(), PrintCellInfo(), ns3::dsdv::RoutingProtocol::PrintRoutingTable(), ns3::aodv::RoutingProtocol::PrintRoutingTable(), ns3::Ipv4ListRouting::PrintRoutingTable(), ns3::Ipv6ListRouting::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), ns3::UplinkSchedulerMBQoS::ProcessBandwidthRequest(), ns3::BSLinkManager::ProcessRangingRequest(), ns3::AnimPacketInfo::ProcessRxEnd(), ns3::SubscriberStationNetDevice::ProcessUlMap(), ns3::AnimationInterface::PurgePendingCsma(), ns3::AnimationInterface::PurgePendingLte(), ns3::AnimationInterface::PurgePendingWifi(), ns3::AnimationInterface::PurgePendingWimax(), RandomFunction(), ns3::UanMacRc::ReceiveOkFromPhy(), ns3::dsdv::RoutingProtocol::RecvDsdv(), ns3::dot11s::HwmpProtocol::Report(), ns3::flame::FlameProtocol::Report(), ns3::dot11s::PeerLink::Report(), ns3::MeshWifiInterfaceMac::Report(), ns3::MeshHelper::Report(), ns3::FlowMonitor::ReportLastRx(), Experiment::ResetData(), NetAnimExperiment::ResetData(), ns3::TcpWestwood::Retransmit(), ns3::RttMeanDeviation::RetransmitTimeout(), ns3::RttEstimator::RttEstimator(), ns3::RvBatteryModel::RvModelAFunction(), ns3::UanMacRc::ScheduleData(), ns3::dsr::DsrRouting::ScheduleNetworkPacketRetry(), ns3::dsr::DsrRouting::ScheduleRreqRetry(), ns3::aodv::RoutingProtocol::SendRerrMessage(), ns3::aodv::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::UanHeaderRcData::Serialize(), ns3::UanHeaderRcRts::Serialize(), ns3::UanHeaderRcCtsGlobal::Serialize(), ns3::UanHeaderRcCts::Serialize(), ns3::dot11s::PeerLink::SetBeaconInformation(), ns3::SimpleDeviceEnergyModel::SetCurrentA(), ns3::olsr::MessageHeader::Hello::SetHTime(), ns3::UanPdp::SetTap(), ns3::olsr::MessageHeader::SetVTime(), showPosition(), DynamicGlobalRoutingTestCase::SinkRx(), SocketPrinter(), ns3::dsr::DsrRouting::Start(), ns3::UanMacRcGw::StartCycle(), ns3::BaseStationNetDevice::StartDlSubFrame(), Ns3TcpStateTestCase::StartFlow(), Ns3TcpLossTestCase::StartFlow(), ns3::BaseStationNetDevice::StartFrame(), ns3::UanMacCw::StartTimer(), ns3::BaseStationNetDevice::StartUlSubFrame(), ns3::UanPdp::SumTapsC(), ns3::UanPdp::SumTapsFromMaxC(), ns3::UanPdp::SumTapsFromMaxNc(), ns3::UanPdp::SumTapsNc(), TestDeterministicByTime(), ns3::TimePrinter(), ns3::CsmaNetDevice::TransmitCompleteEvent(), ns3::CsmaChannel::TransmitEnd(), ns3::PointToPointNetDevice::TransmitStart(), ns3::CsmaNetDevice::TransmitStart(), ns3::LteHandoverDelayTestCase::UeHandoverEndOkCallback(), ns3::ConstantVelocityHelper::Update(), BatteryLifetimeTest::VariableLoadTest(), ns3::WriteAveragePowerSpectralDensityReport(), ns3::AnimationInterface::WriteDummyPacket(), Ns3TcpStateTestCase::WriteUntilBufferFull(), and Ns3TcpLossTestCase::WriteUntilBufferFull().
|
inline |
Definition at line 311 of file nstime.h.
References m_data.
Referenced by GetInteger(), ns3::Radvd::HandleRead(), ns3::Synchronizer::NanosecondToTimeStep(), ns3::OmnetDataOutput::OmnetOutputCallback::OutputSingleton(), ns3::SqliteDataOutput::SqliteOutputCallback::OutputSingleton(), ns3::RealtimeSimulatorImpl::ProcessOneEvent(), ns3::DefaultSimulatorImpl::Schedule(), ns3::RealtimeSimulatorImpl::Schedule(), ns3::DistributedSimulatorImpl::Schedule(), ns3::RealtimeSimulatorImpl::ScheduleRealtimeWithContext(), ns3::DefaultSimulatorImpl::ScheduleWithContext(), ns3::RealtimeSimulatorImpl::ScheduleWithContext(), ns3::DistributedSimulatorImpl::ScheduleWithContext(), and ns3::DefaultSimulatorImpl::Stop().
|
inline |
|
inline |
Definition at line 234 of file nstime.h.
References m_data.
Referenced by ns3::DefaultSimulatorImpl::Schedule(), ns3::RealtimeSimulatorImpl::Schedule(), and ns3::DistributedSimulatorImpl::Schedule().
|
inline |
|
inline |
|
inline |
Definition at line 220 of file nstime.h.
References m_data.
Referenced by main(), and ns3::YansWifiPhy::StartReceivePacket().
|
inline |
|
inlinestaticreadprivate |
Definition at line 465 of file nstime.h.
References ns3::Time::Resolution::info, and PeekResolution().
Referenced by From(), FromInteger(), To(), and ToInteger().
|
inlinestaticreadprivate |
Definition at line 460 of file nstime.h.
References GetNsResolution().
Referenced by GetResolution(), PeekInformation(), and SetResolution().
|
static |
resolution | the new resolution to use |
Change the global resolution used to convert all user-provided time values in Time objects and Time objects in user-expected time units.
Definition at line 98 of file time.cc.
References NS_LOG_FUNCTION, and PeekResolution().
Referenced by GetNsResolution().
|
staticprivate |
Definition at line 104 of file time.cc.
References ns3::Time::Information::factor, ns3::Time::Information::fromMul, ns3::Time::Resolution::info, LAST, NS_ASSERT, NS_LOG_FUNCTION, ns3::Time::Information::timeFrom, ns3::Time::Information::timeTo, ns3::Time::Information::toMul, and ns3::Time::Resolution::unit.
|
inline |
Definition at line 419 of file nstime.h.
References m_data, PeekInformation(), ns3::Time::Information::timeTo, and ns3::Time::Information::toMul.
Referenced by ns3::OnOffApplication::CancelEvents(), and ToDouble().
|
inline |
timeUnit | the unit of the value to return |
Convert the input time into a floating point value according to the requested time unit.
Definition at line 399 of file nstime.h.
References To().
Referenced by GetSeconds(), and ns3::RttMeanDeviation::Measurement().
|
inline |
timeUnit | the unit of the value to return |
Convert the input time into an integer value according to the requested time unit.
Definition at line 367 of file nstime.h.
References ns3::Time::Information::factor, m_data, PeekInformation(), and ns3::Time::Information::toMul.
Referenced by GetFemtoSeconds(), GetMicroSeconds(), GetMilliSeconds(), GetNanoSeconds(), GetPicoSeconds(), and ns3::RttMeanDeviation::RetransmitTimeout().
|
private |
Definition at line 487 of file nstime.h.
Referenced by Compare(), GetDouble(), GetTimeStep(), IsNegative(), IsPositive(), IsStrictlyNegative(), IsStrictlyPositive(), IsZero(), operator int64x64_t(), ns3::operator!=(), ns3::operator+(), ns3::operator+=(), ns3::operator-(), ns3::operator-=(), ns3::operator<(), ns3::operator<=(), operator=(), ns3::operator==(), ns3::operator>(), ns3::operator>=(), To(), and ToInteger().