Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::Timer Class Reference

Timer handles known events that must happen (fairly) regularly. More...

#include <timer.h>

List of all members.

Public Member Functions

 Timer (Uint32 mseconds, bool runnning=true)
 Create a timer with a given timeout period (in milliseconds).

void setInterval (unsigned int delta)
 Set the timeout period.

Uint32 interval () const
 Get the timeout period.

void run ()
 Run the timer.

void halt ()
 Halt the timer.


Static Public Member Functions

void processAllTimers ()
 Trigger all timers for which sufficient time has passed.

Uint32 limitWait (Uint32 max)
 returns the lesser of amount of time until the next timer and 'max'.


Public Attributes

Alarm alarm
 Emitted when the timer is triggered, slots can optionally receive the ammout of time passed.


Detailed Description

Timer handles known events that must happen (fairly) regularly.


Member Function Documentation

Uint32 wftk::Timer::limitWait Uint32  max  )  [static]
 

returns the lesser of amount of time until the next timer and 'max'.

This handles the corner case where no timers are running more cleanly than a simple 'get next time' function.


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

Generated Wed Jul 28 17:28:43 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.