Rev 1595 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1595 | Rev 1646 | ||
|---|---|---|---|
| Line 36... | Line 36... | ||
| 36 | typedef boost::shared_ptr<Timer> Pointer; |
36 | typedef boost::shared_ptr<Timer> Pointer; |
| 37 | 37 | ||
| 38 | typedef boost::signals2::signal<void(TimerId)> SignalOnTimeout; |
38 | typedef boost::signals2::signal<void(TimerId)> SignalOnTimeout; |
| 39 | 39 | ||
| 40 | Timer(boost::asio::io_service& io_service, TimerId id, unsigned int timeout, bool repeat); |
40 | Timer(boost::asio::io_service& io_service, TimerId id, unsigned int timeout, bool repeat); |
| - | 41 | Timer(boost::asio::io_service& io_service, TimerId id, std::string time); |
|
| 41 | virtual ~Timer(); |
42 | virtual ~Timer(); |
| 42 | 43 | ||
| 43 | void ConnectSlots(const SignalOnTimeout::slot_type& slot_on_timeout); |
44 | void ConnectSlots(const SignalOnTimeout::slot_type& slot_on_timeout); |
| 44 | 45 | ||
| 45 | TimerId GetId(); |
46 | TimerId GetId(); |
| Line 48... | Line 49... | ||
| 48 | void Cancel(); |
49 | void Cancel(); |
| 49 | 50 | ||
| 50 | private: |
51 | private: |
| 51 | boost::asio::deadline_timer instance_; |
52 | boost::asio::deadline_timer instance_; |
| 52 | TimerId id_; |
53 | TimerId id_; |
| - | 54 | std::string time_; |
|
| 53 | unsigned int timeout_; |
55 | unsigned int timeout_; |
| 54 | bool repeat_; |
56 | bool repeat_; |
| 55 | 57 | ||
| 56 | SignalOnTimeout signal_on_timeout_; |
58 | SignalOnTimeout signal_on_timeout_; |
| 57 | 59 | ||