39 .SetGroupName (
"Core")
45 : m_realtimeOriginNano (0),
virtual int64_t DoGetDrift(uint64_t ns)=0
Get the drift between the real time clock used to synchronize the simulation and the current simulati...
virtual void DoSetCondition(bool)=0
Set the condition variable to tell a possible simulator thread waiting in the Synchronize method that...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint64_t NanosecondToTimeStep(uint64_t ns)
Convert a normalized nanosecond time step into a simulator time step (in Time resolution units)...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint64_t GetCurrentRealtime(void)
Retrieve the value of the origin of the underlying normalized wall clock time in simulator timestep u...
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetCondition(bool)
Set the condition variable that tells a possible simulator thread waiting in the Synchronize method t...
void EventStart(void)
Ask the synchronizer to remember what time it is.
uint64_t EventEnd(void)
Ask the synchronizer to return the time step between the instant remembered during EventStart and now...
virtual void DoSetOrigin(uint64_t ns)=0
Establish a correspondence between a simulation time and a wall-clock (real) time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
bool Synchronize(uint64_t tsCurrent, uint64_t tsDelay)
Wait until the real time is in sync with the specified simulation time or until the synchronizer is S...
bool Realtime(void)
Return true if this synchronizer is actually synchronizing to a realtime clock.
uint64_t GetOrigin(void)
Retrieve the value of the origin of the simulation time in Time.resolution units. ...
Time TimeStep(uint64_t ts)
virtual uint64_t DoGetCurrentRealtime(void)=0
Retrieve the value of the origin of the underlying normalized wall clock time in Time resolution unit...
Synchronizer()
Constructor.
ns3::Synchronizer declaration.
virtual void DoEventStart(void)=0
Record the normalized real time at which the current event is starting execution. ...
int64_t GetDrift(uint64_t ts)
Retrieve the difference between the real time clock used to synchronize the simulation and the simula...
virtual void DoSignal(void)=0
Tell a possible simulator thread waiting in the DoSynchronize method that an event has happened which...
uint64_t m_simOriginNano
The simulation time, in ns, when SetOrigin was called.
static TypeId GetTypeId(void)
Get the registered TypeId for this class.
void SetOrigin(uint64_t ts)
Establish a correspondence between a simulation time and the synchronizer real time.
void Signal(void)
Tell a possible simulator thread waiting in the Synchronize method that an event has happened which d...
uint64_t TimeStepToNanosecond(uint64_t ts)
Convert a simulator time step (in Time resolution units) to a normalized time step in nanosecond unit...
A base class which provides memory management and object aggregation.
virtual uint64_t DoEventEnd(void)=0
Return the amount of real time elapsed since the last call to EventStart.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual ~Synchronizer()
Destructor.
virtual bool DoRealtime(void)=0
Return true if this synchronizer is actually synchronizing to a realtime clock.
int64_t GetTimeStep(void) const
Get the raw time value, in the current resolution unit.
virtual bool DoSynchronize(uint64_t nsCurrent, uint64_t nsDelay)=0
Wait until the real time is in sync with the specified simulation time.