try to fix tm thread

Origin commit data
------------------
Commit: 513850f915
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-09-14 (Thu, 14 Sep 2017)
This commit is contained in:
Jacek Jendrzej
2017-09-14 12:09:40 +02:00
parent 0f9284bf91
commit f598fd51d3

View File

@@ -43,11 +43,11 @@ CComponentsTimer::CComponentsTimer(const int& interval, bool is_nano)
tm_thread = 0; tm_thread = 0;
tm_interval = interval; tm_interval = interval;
tm_enable_nano = is_nano; tm_enable_nano = is_nano;
tm_enable = false;
sl_stop_timer = sigc::mem_fun(*this, &CComponentsTimer::stopTimer); sl_stop_timer = sigc::mem_fun(*this, &CComponentsTimer::stopTimer);
if (interval > 0) if (interval > 0)
startTimer(); tm_enable = startTimer();
} }
CComponentsTimer::~CComponentsTimer() CComponentsTimer::~CComponentsTimer()
@@ -132,12 +132,11 @@ void CComponentsTimer::stopThread()
bool CComponentsTimer::startTimer() bool CComponentsTimer::startTimer()
{ {
tm_enable = true;
initThread(); initThread();
if(tm_thread) if(tm_thread)
return true; tm_enable = true;
return false; return tm_enable;
} }
bool CComponentsTimer::stopTimer() bool CComponentsTimer::stopTimer()