#pragma once #include #include #include #include #include "Swiften/EventLoop/EventOwner.h" namespace Swift { class Timer : public EventOwner, public boost::enable_shared_from_this { public: Timer(int milliseconds, boost::asio::io_service* service); ~Timer(); void start(); void stop(); public: boost::signal onTick; private: void handleTimerTick(const boost::system::error_code& error); private: int timeout; boost::asio::deadline_timer timer; }; }