A Discrete-Event Network Simulator
API
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::TimeValue
 
class  ns3::TimeWithUnit
 A Time with attached unit, to facilitate output in that unit. More...
 

Namespaces

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

Typedefs

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

Functions

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

Detailed Description

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

Definition in file nstime.h.