CComponentsTimer: allow to set a thread name

This commit is contained in:
Stefan Seyfried
2017-02-12 14:46:42 +01:00
committed by svenhoefer
parent 58c6dbf469
commit 6fdd920e42
2 changed files with 14 additions and 1 deletions

View File

@@ -63,6 +63,9 @@ class CComponentsTimer : public sigc::trackable
///flag to control thread state
bool tm_enable;
///name for the thread
std::string name;
///mutex for timer
OpenThreads::Mutex tm_mutex;
///slot for restart signals
@@ -120,6 +123,13 @@ class CComponentsTimer : public sigc::trackable
*/
void setTimerInterval(const int& interval, bool is_nano = false);
/**set thread name
* @param[in] thread name
* @return
* void
*/
void setThreadName(const std::string& n) { name = n; };
/**Provides a signal handler to receive any function or methode.
* Use this in your class where ever you need time controled actions.
*