cc_timer: show object name for better identification in debug output

This commit is contained in:
2020-01-17 08:22:28 +01:00
parent b73ec56278
commit 9ba2a4a0cf

View File

@@ -62,12 +62,12 @@ void CComponentsTimer::threadCallback(CComponentsTimer *tm)
if (!tm)
return;
if (tm->OnTimer.empty())
dprintf(DEBUG_NORMAL," \033[36m[CComponentsTimer] [%s - %d] Signal OnTimer is empty, no callback defined \033[0m\n", __func__, __LINE__);
tm->tn = "cc.timer:" + tm->tm_thread_name;
set_threadname(tm->tn.c_str());
if (tm->OnTimer.empty())
dprintf(DEBUG_NORMAL," \033[36m[CComponentsTimer] [%s - %d] Signal OnTimer for %s is empty, no callback defined \033[0m\n", __func__, __LINE__, tm->tn.c_str());
dprintf(DEBUG_DEBUG,"\033[32m[CComponentsTimer] thread [%p] [%s] [%s - %d] loop start \033[0m\n", tm->tm_thread, tm->tn.c_str(), __func__, __LINE__);
#if HAVE_COOL_HARDWARE //time offset