|
ZNC trunk
|
#include <Modules.h>
Public Member Functions | |
| CTimer (CModule *pModule, unsigned int uInterval, unsigned int uCycles, const CString &sLabel, const CString &sDescription) | |
| virtual | ~CTimer () |
| CTimer (const CTimer &)=delete | |
| CTimer & | operator= (const CTimer &)=delete |
| void | SetModule (CModule *p) |
| void | SetDescription (const CString &s) |
| CModule * | GetModule () const |
| const CString & | GetDescription () const |
| void | run (timeval &tNow) |
| This is used by the Job Manager, and not you directly. | |
| void | StartMaxCycles (double dTimeSequence, uint32_t iMaxCycles) |
| void | StartMaxCycles (const timeval &tTimeSequence, uint32_t iMaxCycles) |
| void | Start (double dTimeSequence) |
| starts and runs infinity amount of times | |
| void | Start (const timeval &TimeSequence) |
| void | Stop () |
| call this to turn off your cron, it will be removed | |
| void | Pause () |
| pauses excution of your code in RunJob | |
| void | UnPause () |
| removes the pause on RunJon | |
| void | Reset () |
| reset the timer | |
| timeval | GetInterval () const |
| uint32_t | GetMaxCycles () const |
| uint32_t | GetCyclesLeft () const |
| bool | isValid () const |
| returns true if cron is active | |
| const CS_STRING & | GetName () const |
| void | SetName (const CS_STRING &sName) |
| timeval | GetNextRun () const |
| returns the timestamp of the next estimated run time. Note that it may not run at this EXACT time, but it will run at least at this time or after | |
| virtual void | RunJob () |
| this is the method you should override | |
Protected Attributes | |
| CModule * | m_pModule |
| CString | m_sDescription |
| bool | m_bRunOnNextCall |
| if set to true, RunJob() gets called on next invocation of run() despite the timeout | |
| CTimer::CTimer | ( | CModule * | pModule, |
| unsigned int | uInterval, | ||
| unsigned int | uCycles, | ||
| const CString & | sLabel, | ||
| const CString & | sDescription ) |
Referenced by CFPTimer::CFPTimer(), and operator=().
|
virtual |
|
delete |
|
inherited |
| const CString & CTimer::GetDescription | ( | ) | const |
|
inherited |
|
inherited |
| CModule * CTimer::GetModule | ( | ) | const |
|
inlineinherited |
returns the timestamp of the next estimated run time. Note that it may not run at this EXACT time, but it will run at least at this time or after
|
inherited |
returns true if cron is active
|
inherited |
pauses excution of your code in RunJob
|
inherited |
reset the timer
|
inherited |
This is used by the Job Manager, and not you directly.
|
virtualinherited |
this is the method you should override
Reimplemented in CFPTimer.
| void CTimer::SetDescription | ( | const CString & | s | ) |
| void CTimer::SetModule | ( | CModule * | p | ) |
|
inherited |
|
inherited |
starts and runs infinity amount of times
|
inherited |
|
inherited |
| TimeSequence | how often to run in seconds |
| iMaxCycles | how many times to run, 0 makes it run forever |
|
inherited |
call this to turn off your cron, it will be removed
|
inherited |
removes the pause on RunJon
|
protectedinherited |
|
protected |
Referenced by CFPTimer::RunJob().
|
protected |