X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Feventdispatcher.h;fp=source%2Feventdispatcher.h;h=8142b080e2bec9140ddccc1be51ba5f70222fc7c;hp=6f6fe6f72a9455320e8954655eda10f2a01d1dcd;hb=8b29f7bad5fac36817424fedd2b6206df9d545c5;hpb=8dbddc01acb154403c38348fd3fbea22ee0b33c4 diff --git a/source/eventdispatcher.h b/source/eventdispatcher.h index 6f6fe6f..8142b08 100644 --- a/source/eventdispatcher.h +++ b/source/eventdispatcher.h @@ -26,10 +26,16 @@ public: void remove(Base &); /** - Checks for and dispatches events. If block is true, will block until events - are available. + Checks for and dispatches events. If there are no events available, blocks + until there are. */ - void tick(bool =true); + void tick(); + + /** + Checks for and dispatches events. If there are no events available, waits + at most the specified time before returning. + */ + void tick(const Time::TimeDelta &); private: struct Slot { @@ -46,6 +52,7 @@ private: void object_events_changed(PollEvent, Base *); void object_deleted(Base *); + void dispatch(); }; } // namespace IO