summaryrefslogtreecommitdiff
path: root/src/monitor.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:05:01 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:05:01 +0900
commit2df873a435ff139cf9d1b10b666d75e6dc6da442 (patch)
tree042b0a349ca84919041fb37df7e5a3b7195d065d /src/monitor.hpp
parentb67f88a7d6322a293ac3e3be9d6df9f358509221 (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.hpp7
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&);
};