Simple timer. More...
#include <timer.h>
Public Types | |
typedef bool(* | kbTimer )(Timer *t) |
the callback that we're informing | |
Public Member Functions | |
Timer (void) | |
constructor; | |
virtual | ~Timer (void) |
destructor; | |
kbTimer | callback (void) const |
the callback | |
bool | isRunning (void) const |
is it running | |
bool | start (int msec) |
start the timer More... | |
void | stop (void) |
stop the timer | |
void | setCallback (kbTimer kb) |
set the callback that is invoked when interval ellapses occurs | |
Protected Member Functions | |
void | timerEvent (QTimerEvent *event) |
internal timer fires; | |
Simple timer.
Notice that it needs an event loop to work
bool Timer::start | ( | int | msec | ) |
start the timer
If already started the interval is changed