class SignallingTimer

A signalling timer. More...

Full nameTelEngine::SignallingTimer
Definition#include <libs/ysig/yatesig.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


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:
intervalThe timeout interval. Set to 0 to disable
timeOptional timeout value. If non 0, the timer is started

inline void  interval (u_int64_t value)

interval

Set the timeout interval

Parameters:
valueThe 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:
paramsThe list of parameters
paramThe name of the parameter containing the timer interval value
minValMinimum value allowed for the timer interval
defValDefault value if it fails to get one from the given parameter
allowDisableTrue to allow 0 for the timer interval
secTrue if the interval value if given in seconds

inline u_int64_t  interval ()

interval

[const]

Get the timeout interval

Returns: The timeout interval

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

start

Start the timer if enabled (interval is positive)

Parameters:
timeTime to be added to the interval to set the timeout point

inline void  stop ()

stop

Stop the timer

inline bool  started ()

started

Check if the timer is started

Returns: True if the timer is started

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

timeout

Check if the timer is started and timed out

Parameters:
timeThe time to compare with

Returns: True if the timer timed out


Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.