#include <scheduler.h>
Inheritance diagram for scheduler::TaskTimeout:
Public Member Functions | |
TaskTimeout (int type, time_t timeout) | |
Constructor. | |
TaskTimeout (TaskTimeout const &t) | |
Copy constructor. | |
virtual TaskTimeout & | operator= (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? |
scheduler::TaskTimeout::TaskTimeout | ( | int | type, | |
time_t | timeout | |||
) | [inline] |
This constructor sets the task type and the timeout.
[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). |
time_t scheduler::TaskTimeout::timeout | ( | time_t | timeout | ) | [inline] |
Sets the interval between two runs.
[in] | timeout | The new interval between two runs. |