A Discrete-Event Network Simulator
API
Virtual Time

Management of virtual time in real world units. More...

+ Collaboration diagram for Virtual Time:

Modules

 Standard Time Units.
 Convenience constructors in standard units.
 

Files

file  nstime.h
 Declaration of classes ns3::Time and ns3::TimeWithUnit, and the TimeValue implementation classes.
 
file  time-printer.cc
 ns3::DefaultTimePrinter implementation.
 
file  time-printer.h
 Declaration of ns3::TimePrinter function pointer type and ns3::DefaultTimePrinter function.
 
file  time.cc
 ns3::Time, ns3::TimeWithUnit and ns3::TimeValue attribute value implementations.
 

Classes

class  ns3::Time
 Simulation virtual time values and global simulation resolution. More...
 
class  ns3::TimeWithUnit
 A Time with attached unit, to facilitate output in that unit. More...
 

Functions

 ns3::TYPENAMEGET_DEFINE (Time)
 ns3::TypeNameGet<Time>() specialization. More...
 

Detailed Description

Management of virtual time in real world units.

The underlying simulator is unit agnostic, just dealing with dimensionless virtual time. Models usually need to handle time in real world units, such as seconds, and conversions/scaling between different units, between minutes and seconds, for example.

The convenience constructors in the Standard Units module make it easy to create Times in specific units.

The Time::SetResolution() function allows a one-time change of the base resolution, before Simulator::Run().

Function Documentation

◆ TYPENAMEGET_DEFINE()

ns3::TYPENAMEGET_DEFINE ( Time  )

ns3::TypeNameGet<Time>() specialization.

Returns
The type name as a string.