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)
keep track of time values and allow control of global simulation resolution
#define NS_LOG_FUNCTION(parameters)
Time TimeStep(uint64_t ts)
Timer()
create a timer with a default event lifetime management policy:
#define NS_ASSERT(condition)
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.
#define NS_FATAL_ERROR(msg)
fatal error handling
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.
NS_LOG_COMPONENT_DEFINE("Timer")
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.