# class SignallingTimer | A signalling timer. More...
Full name | `TelEngine::SignallingTimer`
Definition | `#include <libs/ysig/yatesig.h>`
Inherited by | SignallingMessageTimer
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline SignallingTimer (u_int64_t interval, u_int64_t time = 0)
- inline void interval (u_int64_t value)
- inline void interval (const NamedList& params, const char* param, unsigned int minVal, unsigned int defVal, bool allowDisable, bool sec = false)
- inline u_int64_t interval () const
- inline u_int64_t fireTime () const
- inline void start (u_int64_t time = Time::msecNow())
- inline void fire (u_int64_t time = Time::msecNow())
- inline void stop ()
- inline bool started () const
- inline bool timeout (u_int64_t time = Time::msecNow()) const

#### Public Static Methods

- static unsigned int getInterval (const NamedList& params, const char* param, unsigned int minVal, unsigned int defVal, unsigned int maxVal = 0, bool allowDisable = false)

## Detailed Description

Timer management class. Used to manage timeouts. The time is kept in miliseconds

inline SignallingTimer (u_int64_t interval, u_int64_t time = 0) | ### SignallingTimer

Constructor

Parameters:

interval | The timeout interval. Set to 0 to disable
time | Optional timeout value. If non 0, the timer is started

inline void interval (u_int64_t value) | ### interval

Set the timeout interval

Parameters:

value | The new timeout value

inline void interval (const NamedList& params, const char* param, unsigned int minVal, unsigned int defVal, bool allowDisable, bool sec = false) | ### interval

Set the timeout interval from a list of parameters. The interval value is checked to be at least minVal or 0 if allowDisable is true

Parameters:

params | The list of parameters
param | The name of the parameter containing the timer interval value
minVal | Minimum value allowed for the timer interval
defVal | Default value if it fails to get one from the given parameter
allowDisable | True to allow 0 for the timer interval
sec | True if the interval value if given in seconds

inline u_int64_t interval () | ### interval

[const]

Get the timeout interval

Returns: The timeout interval

inline u_int64_t fireTime () | ### fireTime

[const]

Get the time this timer will fire (timeout)

Returns: The timeout (fire) time

inline void start (u_int64_t time = Time::msecNow()) | ### start

Start the timer if enabled (interval is positive)

Parameters:

time | Time to be added to the interval to set the timeout point

inline void fire (u_int64_t time = Time::msecNow()) | ### fire

Fire the timer at a specific absolute time

Parameters:

time | Absolute time (in msec) when the timer will fire

inline void stop () | ### stop

Stop the timer

inline bool started () | ### started

[const]

Check if the timer is started

Returns: True if the timer is started

inline bool timeout (u_int64_t time = Time::msecNow()) | ### timeout

[const]

Check if the timer is started and timed out

Parameters:

time | The time to compare with

Returns: True if the timer timed out

unsigned int getInterval (const NamedList& params, const char* param, unsigned int minVal, unsigned int defVal, unsigned int maxVal = 0, bool allowDisable = false) | ### getInterval

[static]

Retrieve a timer interval from a list of parameters.

Parameters:

params | The list of parameters
param | The name of the parameter containing the timer interval value
minVal | Minimum value allowed for the timer interval
defVal | Default value if it fails to get one from the given parameter
maxVal | Optional interval maximum value
allowDisable | True to allow 0 for the timer interval

Returns: The interval value

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.