VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GNet::TimerBase Class Referenceabstract

An interface used by GNet::TimerList to keep track of pending timeouts and to deliver timeout events. More...

#include <gtimer.h>

+ Inheritance diagram for GNet::TimerBase:

Public Member Functions

virtual ~TimerBase ()
 Destructor.
 
void startTimer (unsigned int interval_s, unsigned int interval_us=0U)
 Starts the timer so that it goes off after the given time interval. More...
 
void startTimer (const G::EpochTime &interval_time)
 Overload for an interval expressed as an G::EpochTime.
 
void cancelTimer ()
 Cancels the timer.
 
bool active () const
 Returns true if the timer is started and not cancelled.
 
bool immediate () const
 Returns true if the timer is active() and zero-length.
 
- Public Member Functions inherited from GNet::EventExceptionHandler
virtual void onException (std::exception &)=0
 Called by the event loop when an exception is thrown out of an event loop callback. More...
 

Protected Member Functions

 TimerBase ()
 Default constructor.
 
virtual void onTimeout ()=0
 Called when the timer expires (or soon after).
 
- Protected Member Functions inherited from GNet::EventExceptionHandler
virtual ~EventExceptionHandler ()
 Destructor.
 

Friends

class TimerList
 

Detailed Description

An interface used by GNet::TimerList to keep track of pending timeouts and to deliver timeout events.

The public methods to start and cancel the timer are normally used via GNet::Timer<>.

Definition at line 41 of file gtimer.h.

Member Function Documentation

void GNet::TimerBase::startTimer ( unsigned int  interval_s,
unsigned int  interval_us = 0U 
)

Starts the timer so that it goes off after the given time interval.

Definition at line 67 of file gtimer.cpp.


The documentation for this class was generated from the following files: