|
CppTimer
|
#include <CppTimer.h>
Public Member Functions | |
| virtual void | startns (long nanosecs, cppTimerType_t t=PERIODIC) |
| virtual void | startms (long millisecs, cppTimerType_t t=PERIODIC) |
| virtual void | stop () |
| virtual | ~CppTimer () |
Protected Member Functions | |
| virtual void | timerEvent ()=0 |
Timer class which repeatedly fires. It's wrapper around the POSIX per-process timer.
|
inlinevirtual |
Destructor disarms the timer, deletes it and disconnect the signal handler.
|
inlinevirtual |
Starts the timer. The timer fires first after the specified time in milliseconds and then at that interval in PERIODIC mode. In ONESHOT mode the timer fires once after the specified time in milliseconds.
| millisecs | Time in milliseconds |
| type | Either PERIODIC or ONESHOT |
|
inlinevirtual |
Starts the timer. The timer fires first after the specified time in nanoseconds and then at that interval in PERIODIC mode. In ONESHOT mode the timer fires once after the specified time in nanoseconds.
| nanosecs | Time in nanoseconds |
| type | Either PERIODIC or ONESHOT |
|
inlinevirtual |
Stops the timer by disarming it. It can be re-started with start().
|
protectedpure virtual |
Abstract function which needs to be implemented by the children. This is called every time the timer fires.