- int64_t iNow = GetTimeMs();
- int64_t iTarget = iNow + iTimeoutMs;
-
- bool bOpened(false);
- while (!bOpened && iNow < iTarget)
- {
- bOpened = m_comm->Open(strPort, 38400, iTimeoutMs);
- iNow = GetTimeMs();
- }
-
- if (!bOpened)
- {
- AddLog(CEC_LOG_ERROR, "could not open a connection");
- return false;
- }
-
- if (!m_cec->Start())