92 template <
typename FN>
101 template <
typename MEM_PTR,
typename OBJ_PTR>
110 template <
typename T1>
118 template <
typename T1,
typename T2>
127 template <
typename T1,
typename T2,
typename T3>
137 template <
typename T1,
typename T2,
typename T3,
typename T4>
148 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
160 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
161 void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);
252 template <
typename FN>
259 template <
typename MEM_PTR,
typename OBJ_PTR>
267 template <
typename T1>
273 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
278 template <
typename T1,
typename T2>
284 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
290 template <
typename T1,
typename T2,
typename T3>
296 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
302 template <
typename T1,
typename T2,
typename T3,
typename T4>
308 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
314 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
320 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
326 template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
332 NS_FATAL_ERROR (
"You cannot set the arguments of a Timer before setting its function.");
keep track of time values and allow control of global simulation resolution
Timer()
create a timer with a default event lifetime management policy:
#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.
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...
void Resume(void)
Restart the timer to expire within the amount of time left saved during Suspend.
Time GetDelay(void) const
an identifier for simulation events.
void Cancel(void)
Cancel the currently-running event if there is one.
TimerImpl * MakeTimerImpl(FN fn)
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