From c2728f95086c54aa842e4c1dae8f3b5c290a72fa Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Mon, 7 Oct 2019 12:35:21 +0100 Subject: IVGCVSW-3937 Refactor and improve the CommandHandleRegistry class * Added simplified RegisterFunctor method * Code refactoring * Updated the unit tests accordingly Signed-off-by: Matteo Martincigh Change-Id: Iee941d898facd9c1ab5366e87c611c99a0468830 --- src/profiling/CommandHandler.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/profiling/CommandHandler.hpp') diff --git a/src/profiling/CommandHandler.hpp b/src/profiling/CommandHandler.hpp index 598eabde76..0cc23429cd 100644 --- a/src/profiling/CommandHandler.hpp +++ b/src/profiling/CommandHandler.hpp @@ -35,13 +35,12 @@ public: {} ~CommandHandler() { Stop(); } + void SetTimeout(uint32_t timeout) { m_Timeout.store(timeout); } + void SetStopAfterTimeout(bool stopAfterTimeout) { m_StopAfterTimeout.store(stopAfterTimeout); } + void Start(IProfilingConnection& profilingConnection); void Stop(); - - bool IsRunning() const; - - void SetTimeout(uint32_t timeout); - void SetStopAfterTimeout(bool stopAfterTimeout); + bool IsRunning() const { return m_IsRunning.load(); } private: void HandleCommands(IProfilingConnection& profilingConnection); -- cgit v1.2.1