E-MailRelay
|
A timer class template in which the timeout is delivered to the specified method. More...
#include <gtimer.h>
Public Types | |
using | method_type = void(T::*)() |
Public Member Functions | |
Timer (T &t, method_type m, EventState) | |
Constructor. More... | |
void | startTimer (unsigned int interval_s, unsigned int interval_us=0U) |
Starts or restarts the timer so that it expires after the given interval. More... | |
void | startTimer (const G::TimeInterval &) |
Starts or restarts the timer so that it expires after the given interval. More... | |
void | cancelTimer () |
Cancels the timer. Does nothing if not running. More... | |
bool | active () const noexcept |
Returns true if the timer is running. More... | |
Timer (const Timer< T > &)=delete | |
Timer (Timer< T > &&)=delete | |
Timer< T > & | operator= (const Timer< T > &)=delete |
Timer< T > & | operator= (Timer< T > &&)=delete |
A timer class template in which the timeout is delivered to the specified method.
Any exception thrown out of the timeout handler is delivered to the specified ExceptionHandler interface so that it can be handled or rethrown.
Eg:
using GNet::Timer< T >::method_type = void (T::*)() |
GNet::Timer< T >::Timer | ( | T & | t, |
method_type | m, | ||
GNet::EventState | es | ||
) |
|
noexcept |
void GNet::Timer< T >::cancelTimer |
void GNet::Timer< T >::startTimer | ( | const G::TimeInterval & | i | ) |
void GNet::Timer< T >::startTimer | ( | unsigned int | interval_s, |
unsigned int | interval_us = 0U |
||
) |