if (!m_communication || !m_communication->Write(data))
return false;
+ CCondition::Sleep((uint32_t) data.size * (uint32_t)24 /*data*/ + (uint32_t)5 /*start bit (4.5 ms)*/);
+
if (bWaitForAck)
{
uint64_t now = GetTimeMs();
gettimeofday(&now, NULL);
iTimeout += now.tv_usec / 1000;
abstime.tv_sec = now.tv_sec + (time_t)(iTimeout / 1000);
- abstime.tv_nsec = (time_t) ( (iTimeout % (uint32_t)1000) * (uint32_t)1000);
+ abstime.tv_nsec = (int32_t)((iTimeout % (uint32_t)1000) * (uint32_t)1000000);
bReturn = (pthread_cond_timedwait(&m_cond, &mutex->m_mutex, &abstime) == 0);
}
else