… | |
… | |
60 | |
60 | |
61 | template<class watcher> |
61 | template<class watcher> |
62 | struct io_manager_vec : protected vector<watcher *> { |
62 | struct io_manager_vec : protected vector<watcher *> { |
63 | friend class io_manager; |
63 | friend class io_manager; |
64 | protected: |
64 | protected: |
|
|
65 | #if IOM_CHECK |
|
|
66 | bool activity; |
|
|
67 | #endif |
|
|
68 | |
65 | void erase_unordered (unsigned int pos) |
69 | void erase_unordered (unsigned int pos) |
66 | { |
70 | { |
67 | watcher *w = (*this)[size () - 1]; |
71 | watcher *w = (*this)[size () - 1]; |
68 | pop_back (); |
72 | pop_back (); |
69 | |
73 | |
… | |
… | |
156 | void start (tstamp when) { set (when); iom.reg (this); } |
160 | void start (tstamp when) { set (when); iom.reg (this); } |
157 | void stop () { iom.unreg (this); } |
161 | void stop () { iom.unreg (this); } |
158 | |
162 | |
159 | template<class O1, class O2> |
163 | template<class O1, class O2> |
160 | time_watcher (O1 *object, void (O2::*method)(time_watcher &)) |
164 | time_watcher (O1 *object, void (O2::*method)(time_watcher &)) |
161 | : callback1<void, time_watcher &>(object,method) |
165 | : callback1<void, time_watcher &>(object,method), at(0) |
162 | { } |
166 | { } |
163 | ~time_watcher () { stop (); } |
167 | ~time_watcher () { stop (); } |
164 | }; |
168 | }; |
165 | #endif |
169 | #endif |
166 | |
170 | |