diff options
Diffstat (limited to 'Swiften/Network/Timer.h')
-rw-r--r-- | Swiften/Network/Timer.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Swiften/Network/Timer.h b/Swiften/Network/Timer.h index 278a8fb..d44a00d 100644 --- a/Swiften/Network/Timer.h +++ b/Swiften/Network/Timer.h @@ -9,15 +9,32 @@ #include "Swiften/Base/boost_bsignals.h" namespace Swift { + /** + * A class for triggering an event after a given period. + */ class Timer { public: typedef boost::shared_ptr<Timer> ref; virtual ~Timer(); + /** + * Starts the timer. + * + * After the given period, onTick() will be called. + */ virtual void start() = 0; + + /** + * Cancels the timer. + * + * If the timer was started, onTick() will no longer be called. + */ virtual void stop() = 0; + /** + * Emitted when the timer expires. + */ boost::signal<void ()> onTick; }; } |