CL_Timer Class Reference

Timer class that invokes a callback on a specified interval. More...

#include <timer.h>

List of all members.

Public Member Functions

Construction

 CL_Timer ()
 Creates a timer object.
virtual ~CL_Timer ()
 Destroys the timer object.
bool is_repeating () const
 Returns true if the timer repeats until it is stopped.
unsigned int get_timeout () const
 Returns the current timeout. In milliseconds.
Events

CL_Callback_v0func_expired ()
 Callback invoked every time the timer interval occurs.
Operations

void start (unsigned int timeout, bool repeat=true)
 Starts the timer. Timeout in milliseconds.
void stop ()
 Stop the timer.

Detailed Description

Timer class that invokes a callback on a specified interval.


Constructor & Destructor Documentation

CL_Timer::CL_Timer (  ) 

Creates a timer object.

virtual CL_Timer::~CL_Timer (  )  [virtual]

Destroys the timer object.


Member Function Documentation

CL_Callback_v0& CL_Timer::func_expired (  ) 

Callback invoked every time the timer interval occurs.

unsigned int CL_Timer::get_timeout (  )  const

Returns the current timeout. In milliseconds.

bool CL_Timer::is_repeating (  )  const

Returns true if the timer repeats until it is stopped.

void CL_Timer::start ( unsigned int  timeout,
bool  repeat = true 
)

Starts the timer. Timeout in milliseconds.

void CL_Timer::stop (  ) 

Stop the timer.


The documentation for this class was generated from the following file: