Utils/Console: Add short help to 'ls' output
[senf.git] / Scheduler / TimerSource.hh
index 4ae5719..c520348 100644 (file)
@@ -92,6 +92,32 @@ namespace detail {
         virtual void disable();
     };
 
+#ifdef HAVE_TIMERFD
+    class TimerFDTimerSource
+        : public detail::FdManager::Event, public TimerSource
+    {
+    public:
+        TimerFDTimerSource();
+        ~TimerFDTimerSource();
+
+        virtual void timeout(ClockService::clock_type timeout);
+        virtual void notimeout();
+
+        virtual void enable();
+        virtual void disable();
+
+        static bool haveTimerFD();
+
+    private:
+        virtual void signal(int events);
+        void reschedule();
+
+        int timerfd_;
+        bool timeoutEnabled_;
+        ClockService::clock_type timeout_;
+    };
+#endif
+
 }}}
 
 ///////////////////////////////hh.e////////////////////////////////////////