From d53c83d7c84b7781658f655110d3c9da2c667ddb Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Thu, 5 Jun 2014 15:56:58 +0200 Subject: [PATCH] TimerListener: make timeout field changeable An accessor for the m_Timeout field was missing. Change-Id: Idf86a3da16a328c783613ed8502446d561f6287c --- src/core/sal/Listener.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/core/sal/Listener.hpp b/src/core/sal/Listener.hpp index af9b750d..37b2bdab 100644 --- a/src/core/sal/Listener.hpp +++ b/src/core/sal/Listener.hpp @@ -749,9 +749,20 @@ public: void setId(timer_id_t id) { m_Data.setId(id); } /** * Retrieves the timer's timeout value. - * @return the timout in microseconds + * @return the timeout in microseconds */ unsigned getTimeout() const { return m_Timeout; } + /** + * Set the timeout value. Returns the old timeout value. Be aware, + * that this method might have no effects, after the listener was added. + * @return the old timeout in microseconds + */ + unsigned setTimeout(unsigned timeout) { + unsigned tmp = m_Timeout; + m_Timeout = timeout; + return tmp; + } + }; } // end-of-namespace: fail