scheduler::TaskTimeout Class Reference

Timeout task class. More...

#include <scheduler.h>

Inheritance diagram for scheduler::TaskTimeout:

scheduler::Task List of all members.

Public Member Functions

 TaskTimeout (int type, time_t timeout)
 Constructor.
 TaskTimeout (TaskTimeout const &t)
 Copy constructor.
virtual TaskTimeoutoperator= (TaskTimeout const &right)
 Assignment operator.
virtual bool poll ()
 Returns true and resets the last time the task was run if the interval has elapsed.
time_t timeout () const
 Returns the interval between two runs.
time_t timeout (time_t timeout)
 Sets the interval between two runs.
time_t last_run () const
 Returns the last time the task was run.

Protected Attributes

time_t m_timeout
 Interval between two runs.
time_t m_lastrun
 When was the task run for the last time?

Detailed Description

The TaskTimeout class is a task class whose poll() function yields true when the given number of seconds has elapsed since the creation of the task or its last run.


Constructor & Destructor Documentation

scheduler::TaskTimeout::TaskTimeout int  type,
time_t  timeout
[inline]
 

This constructor sets the task type and the timeout.

Parameters:
[in] type The task type.
[in] timeout The interval between two runs, in seconds (the first run being done when this amount of time expires).


Member Function Documentation

time_t scheduler::TaskTimeout::timeout time_t  timeout  )  [inline]
 

Sets the interval between two runs.

Parameters:
[in] timeout The new interval between two runs.
Returns:
The new interval between two runs.


The documentation for this class was generated from the following file:
Generated on Sun May 20 21:32:22 2007 for Epona API by  doxygen 1.4.6