30 : m_flags (CHECK_ON_DESTROY),
31 m_delay (FemtoSeconds (0)),
39 : m_flags (destroyPolicy),
40 m_delay (FemtoSeconds (0)),
static Time GetDelayLeft(const EventId &id)
Simulation virtual time values and global simulation resolution.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Time TimeStep(uint64_t ts)
Timer()
create a timer with a default event lifetime management policy:
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_FATAL_ERROR(msg)
fatal error handling
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
bool IsRunning(void) const
This method is syntactic sugar for the ns3::Simulator::isExpired method.
bool IsRunning(void) const
This policy enforces a check from the destructor of the Timer to verify that the timer has already ex...
void Schedule(void)
Schedule a new event using the currently-configured delay, function, and arguments.
void Remove(void)
Remove from the simulation event-list the currently-running event if there is one.
virtual EventId Schedule(const Time &delay)=0
void SetDelay(const Time &delay)
enum Timer::State GetState(void) const
This policy cancels the event from the destructor of the Timer to verify that the event has already e...
This policy removes the event from the simulation event list when the destructor of the Timer is invo...
static void Remove(const EventId &id)
Remove an event from the event list.
void Resume(void)
Restart the timer to expire within the amount of time left saved during Suspend.
Time GetDelay(void) const
void Cancel(void)
Cancel the currently-running event if there is one.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
DestroyPolicy
The policy to use to manager the internal timer when and instance of the Timer class is destroyed...
bool IsExpired(void) const
void Suspend(void)
Cancel the timer and save the amount of time left until it was set to expire.
bool IsSuspended(void) const
Time GetDelayLeft(void) const
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::isExpired method.