Public Member Functions | |
TimeSpan | accumulatedDeviation () const |
bool | hasRun () const |
TimeSpan | maxDeviation () const |
TimeSpan | meanDeviation () const |
PeriodicTestThread (const TimeSpan &period, size_t runs) | |
virtual void | run () |
virtual | ~PeriodicTestThread () |
Private Attributes | |
TimeSpan | m_accumulated_deviation |
bool | m_has_run |
TimeSpan | m_max_deviation |
size_t | m_runs |
Thread for testing how exact the periods are executed.
Definition at line 62 of file ts_PeriodicThread.cpp.
PeriodicTestThread::PeriodicTestThread | ( | const TimeSpan & | period, |
size_t | runs | ||
) | [inline] |
Definition at line 65 of file ts_PeriodicThread.cpp.
virtual PeriodicTestThread::~PeriodicTestThread | ( | ) | [inline, virtual] |
Definition at line 70 of file ts_PeriodicThread.cpp.
TimeSpan PeriodicTestThread::accumulatedDeviation | ( | ) | const [inline] |
Definition at line 98 of file ts_PeriodicThread.cpp.
bool PeriodicTestThread::hasRun | ( | ) | const [inline] |
Definition at line 96 of file ts_PeriodicThread.cpp.
TimeSpan PeriodicTestThread::maxDeviation | ( | ) | const [inline] |
Definition at line 97 of file ts_PeriodicThread.cpp.
TimeSpan PeriodicTestThread::meanDeviation | ( | ) | const [inline] |
Definition at line 99 of file ts_PeriodicThread.cpp.
virtual void PeriodicTestThread::run | ( | ) | [inline, virtual] |
This is the function running in the thread. This has to be reimplemented from derived classes. If you start the thread by calling Start() this function is executed in the thread. If you call don't want that function to be executed in the thread you could call it directly in your derived class.
Implements icl_core::thread::Thread.
Definition at line 72 of file ts_PeriodicThread.cpp.
Definition at line 105 of file ts_PeriodicThread.cpp.
bool PeriodicTestThread::m_has_run [private] |
Definition at line 102 of file ts_PeriodicThread.cpp.
TimeSpan PeriodicTestThread::m_max_deviation [private] |
Definition at line 104 of file ts_PeriodicThread.cpp.
size_t PeriodicTestThread::m_runs [private] |
Definition at line 103 of file ts_PeriodicThread.cpp.