#include <PeriodicThread.h>
Protected Member Functions | |
void | waitPeriod () |
Protected Member Functions inherited from icl_core::Noncopyable | |
Noncopyable () | |
virtual | ~Noncopyable () |
Private Member Functions | |
virtual void | makePeriodic () |
Private Attributes | |
PeriodicThreadImpl * | m_impl |
Additional Inherited Members | |
Static Public Member Functions inherited from icl_core::thread::Thread | |
static icl_core::ThreadId | selfId () |
Implements a periodic thread.
The thread's main loop can wait until the configured period has elapsed by calling waitPeriod().
Definition at line 55 of file PeriodicThread.h.
icl_core::thread::PeriodicThread::PeriodicThread | ( | const icl_core::String & | description, |
const icl_core::TimeSpan & | period, | ||
ThreadPriority | priority = 0 |
||
) |
Initializes a periodic thread.
description | The thread's description. |
period | The relative period after which the thread is cyclically woken up. |
priority | The thread's priority. |
Definition at line 50 of file PeriodicThread.cpp.
|
virtual |
Deletes a periodic thread.
Definition at line 106 of file PeriodicThread.cpp.
|
privatevirtual |
Makes the thread periodic.
This function is overridden in PeriodicThread.
Reimplemented from icl_core::thread::Thread.
Definition at line 181 of file PeriodicThread.cpp.
icl_core::TimeSpan icl_core::thread::PeriodicThread::period | ( | ) | const |
Returns the thread's period.
Definition at line 111 of file PeriodicThread.cpp.
bool icl_core::thread::PeriodicThread::setPeriod | ( | const icl_core::TimeSpan & | period | ) |
Changes the thread's period.
true
on success, false
if the period could not be changed. Definition at line 116 of file PeriodicThread.cpp.
|
protected |
Sleep until the end of the current period.
Definition at line 143 of file PeriodicThread.cpp.
|
private |
Definition at line 121 of file PeriodicThread.h.