A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
nstime.h File Reference

Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes. More...

#include "assert.h"
#include "attribute-helper.h"
#include "attribute.h"
#include "event-id.h"
#include "int64x64.h"
#include "type-name.h"
#include <cmath>
#include <limits>
#include <ostream>
#include <set>
#include <stdint.h>
+ Include dependency graph for nstime.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ns3::Time::Information
 How to convert between other units and the current unit. More...
 
struct  ns3::Time::Resolution
 Current time unit, and conversion info. More...
 
class  ns3::Time
 Simulation virtual time values and global simulation resolution. More...
 
class  ns3::TimeInitializationHelper
 Helper class to force static initialization of Time in each compilation unit, ensuring it is initialized before usage. More...
 
class  ns3::TimeValue
 AttributeValue implementation for Time. More...
 
class  ns3::TimeWithUnit
 A Time with attached unit, to facilitate output in that unit. More...
 

Namespaces

namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
namespace  ns3::TracedValueCallback
 TracedValue Callback function types.
 

Typedefs

typedef void(* ns3::TracedValueCallback::Time) (Time oldValue, Time newValue)
 TracedValue callback signature for Time.
 

Functions

Time ns3::Abs (const Time &time)
 Absolute value for Time.
 
int64_t ns3::Div (const Time &lhs, const Time &rhs)
 Integer quotient from dividing two Times.
 
template<typename T1 >
Ptr< const AttributeAccessorns3::MakeTimeAccessor (T1 a1)
 Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
 
template<typename T1 , typename T2 >
Ptr< const AttributeAccessorns3::MakeTimeAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods from a class.
 
Ptr< const AttributeCheckerns3::MakeTimeChecker ()
 Helper to make an unbounded Time checker.
 
Ptr< const AttributeCheckerns3::MakeTimeChecker (const Time min)
 Helper to make a Time checker with a lower bound.
 
Ptr< const AttributeCheckerns3::MakeTimeChecker (const Time min, const Time max)
 Helper to make a Time checker with bounded range.
 
Time ns3::Max (const Time &timeA, const Time &timeB)
 Maximum of two Times.
 
Time ns3::Min (const Time &timeA, const Time &timeB)
 Minimum of two Times.
 
bool ns3::operator!= (const Time &lhs, const Time &rhs)
 Inequality operator for Time.
 
Time ns3::operator* (const int64x64_t &lhs, const Time &rhs)
 Scale a Time by a numeric value.
 
Time ns3::operator* (const Time &lhs, const int64x64_t &rhs)
 Scale a Time by a numeric value.
 
template<class T >
std::enable_if_t< std::is_integral_v< T >, Timens3::operator* (const Time &lhs, T rhs)
 Scale a Time by an integer value.
 
template<class T >
std::enable_if_t< std::is_floating_point_v< T >, Timens3::operator* (const Time &lhs, T rhs)
 
template<class T >
std::enable_if_t< std::is_arithmetic_v< T >, Timens3::operator* (T lhs, const Time &rhs)
 Scale a Time by a numeric value.
 
Time ns3::operator+ (const Time &lhs, const Time &rhs)
 Addition operator for Time.
 
Timens3::operator+= (Time &lhs, const Time &rhs)
 Compound addition assignment for Time.
 
Time ns3::operator- (const Time &lhs, const Time &rhs)
 Subtraction operator for Time.
 
Timens3::operator-= (Time &lhs, const Time &rhs)
 Compound subtraction assignment for Time.
 
Time ns3::operator/ (const Time &lhs, const int64x64_t &rhs)
 Scale a Time by a numeric value.
 
int64x64_t ns3::operator/ (const Time &lhs, const Time &rhs)
 Exact division, returning a dimensionless fixed point number.
 
template<class T >
std::enable_if_t< std::is_integral_v< T >, Timens3::operator/ (const Time &lhs, T rhs)
 Divide a Time by an integer value.
 
template<class T >
std::enable_if_t< std::is_floating_point_v< T >, Timens3::operator/ (const Time &lhs, T rhs)
 
bool ns3::operator< (const Time &lhs, const Time &rhs)
 Less than operator for Time.
 
bool ns3::operator< (const Time &time, const EventId &event)
 Compare a Time to an EventId.
 
std::ostream & ns3::operator<< (std::ostream &os, const Time &time)
 Time output streamer.
 
bool ns3::operator<= (const Time &lhs, const Time &rhs)
 Less than or equal operator for Time.
 
bool ns3::operator== (const Time &lhs, const Time &rhs)
 Equality operator for Time.
 
bool ns3::operator> (const Time &lhs, const Time &rhs)
 Greater than operator for Time.
 
bool ns3::operator>= (const Time &lhs, const Time &rhs)
 Greater than or equal operator for Time.
 
std::istream & ns3::operator>> (std::istream &is, Time &time)
 Time input streamer.
 
 ns3::TYPENAMEGET_DEFINE (Time)
 ns3::TypeNameGet<Time>() specialization.
 
Time ns3::operator% (const Time &lhs, const Time &rhs)
 Remainder (modulus) from the quotient of two Times.
 
Time ns3::Rem (const Time &lhs, const Time &rhs)
 Remainder (modulus) from the quotient of two Times.
 
Time ns3::Days (double value)
 Construct a Time in the indicated unit.
 
Time ns3::Days (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::FemtoSeconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::FemtoSeconds (uint64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::Hours (double value)
 Construct a Time in the indicated unit.
 
Time ns3::Hours (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::MicroSeconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::MicroSeconds (uint64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::MilliSeconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::MilliSeconds (uint64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::Minutes (double value)
 Construct a Time in the indicated unit.
 
Time ns3::Minutes (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::NanoSeconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::NanoSeconds (uint64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::PicoSeconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::PicoSeconds (uint64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::Seconds (double value)
 Construct a Time in the indicated unit.
 
Time ns3::Seconds (int64x64_t value)
 Construct a Time in the indicated unit.
 
Time ns3::Years (double value)
 Construct a Time in the indicated unit.
 
Time ns3::Years (int64x64_t value)
 Construct a Time in the indicated unit.
 

Variables

static TimeInitializationHelper ns3::g_timeInitHelper
 Instance of Time static initialization helper.
 

Detailed Description

Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes.

Definition in file nstime.h.