diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:05:01 +0900 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-02-16 10:05:01 +0900 |
commit | 2df873a435ff139cf9d1b10b666d75e6dc6da442 (patch) | |
tree | 042b0a349ca84919041fb37df7e5a3b7195d065d /src/monitor.hpp | |
parent | b67f88a7d6322a293ac3e3be9d6df9f358509221 (diff) |
Timers identified by dynamically generated handles
Timers are not longer identified by hard-wired IDs.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/monitor.hpp')
-rw-r--r-- | src/monitor.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/monitor.hpp b/src/monitor.hpp index 8aa58ba..73bc31c 100644 --- a/src/monitor.hpp +++ b/src/monitor.hpp @@ -47,19 +47,20 @@ namespace xs private: - enum {timer_id = 0x44}; - // Handlers for incoming commands. void process_plug (); void process_stop (); // Events from the poller. - void timer_event (int id_); + void timer_event (handle_t handle_); // Actual monitoring data to send and the related critical section. std::string text; mutex_t sync; + // Handle of the timer. + handle_t timer; + monitor_t (const monitor_t&); const monitor_t &operator = (const monitor_t&); }; |