openMSX
|
Convenience wrapper around the Alarm class. More...
#include <AlarmEvent.hh>
Public Member Functions | |
AlarmEvent (EventDistributor &distributor, EventListener &listener, EventType type, EventDistributor::Priority priority=EventDistributor::OTHER) | |
~AlarmEvent () | |
Public Member Functions inherited from openmsx::Alarm | |
void | schedule (unsigned period) |
Arrange for the alarm() method to be called after some time. More... | |
void | cancel () |
Cancel a previous schedule() request. More... | |
bool | pending () const |
Is there a pending alarm? More... | |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::Alarm | |
Alarm () | |
virtual | ~Alarm () |
void | prepareDelete () |
Concrete subclasses MUST call this method in their destructor. More... | |
Convenience wrapper around the Alarm class.
An expired alarm callback runs in the timer thread. Very often you instead want a callback in the main thread. This class takes care of that, it will make sure the signalEvent() method of the given EventListener gets called, in the main thread, when the alarm expires.
Definition at line 18 of file AlarmEvent.hh.
openmsx::AlarmEvent::AlarmEvent | ( | EventDistributor & | distributor, |
EventListener & | listener, | ||
EventType | type, | ||
EventDistributor::Priority | priority = EventDistributor::OTHER |
||
) |
Definition at line 5 of file AlarmEvent.cc.
References openmsx::EventDistributor::registerEventListener().
openmsx::AlarmEvent::~AlarmEvent | ( | ) |
Definition at line 16 of file AlarmEvent.cc.
References openmsx::Alarm::prepareDelete(), and openmsx::EventDistributor::unregisterEventListener().