[Click] Timers in Click

nsclick at gmx.de nsclick at gmx.de
Thu Dec 19 05:23:41 EST 2013


Hello,

I have a problem with understanding the whole timer stuff.
When using a timer you have a constructor like this:

PeriodicPrinter::PeriodicPrinter()
     : _timer(this)    // Sets _timer to call this->run_timer(&_timer)
{                     // when it fires.
}


But what is this C++ construct called where this ": _timer(this)" is between the head of the class-constructor and the opening curly brace?
And how can I add there multiple timers? For example _timerA and _timerB?

Thanks in advance,

Thomas


More information about the click mailing list