summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-30 15:50:12 +0100
committerRobin Gareus <robin@gareus.org>2015-10-30 15:55:26 +0100
commit7abfe85498080f202b19e02744df1e5352a06ce0 (patch)
tree27335a39a091be35f261da862473c00e24f7c3df /libs/pbd/pbd
parent3e634396378f14b337d7f10d01968466fb3f0e94 (diff)
add API to suspend timers signal emission.
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/timer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/pbd/pbd/timer.h b/libs/pbd/pbd/timer.h
index 4c80d9d088..4d96eedf7f 100644
--- a/libs/pbd/pbd/timer.h
+++ b/libs/pbd/pbd/timer.h
@@ -46,6 +46,9 @@ public:
virtual unsigned int connection_count () const = 0;
+ void suspend () { m_suspended = true; }
+ void resume () { m_suspended = false; }
+
protected:
virtual ~Timer() { }
@@ -56,6 +59,8 @@ protected:
virtual bool on_elapsed () = 0;
+ bool suspended () const { return m_suspended; }
+
private:
Timer(const Timer&);
@@ -73,6 +78,8 @@ private:
const Glib::RefPtr<Glib::MainContext> m_main_context;
+ bool m_suspended;
+
};
class LIBPBD_API StandardTimer : public Timer