Optimise the timestamp handling.

This commit is contained in:
Jonathan Naylor 2020-05-14 11:16:54 +01:00
parent 9ebcca5b56
commit f420522862

View File

@ -375,12 +375,12 @@ bool CKenwoodNetwork::writeRTPVoiceData(const unsigned char* data)
bool CKenwoodNetwork::writeRTCPStart() bool CKenwoodNetwork::writeRTCPStart()
{ {
#if defined(_WIN32) || defined(_WIN64)
time_t now; time_t now;
::time(&now); ::time(&now);
m_startSecs = uint32_t(now); m_startSecs = uint32_t(now);
#if defined(_WIN32) || defined(_WIN64)
SYSTEMTIME st; SYSTEMTIME st;
::GetSystemTime(&st); ::GetSystemTime(&st);
@ -389,6 +389,7 @@ bool CKenwoodNetwork::writeRTCPStart()
struct timeval tod; struct timeval tod;
::gettimeofday(&tod, NULL); ::gettimeofday(&tod, NULL);
m_startSecs = tod.tv_sec;
m_startMSecs = tod.tv_usec / 1000U; m_startMSecs = tod.tv_usec / 1000U;
#endif #endif