Optimise the timestamp handling.

This commit is contained in:
Jonathan Naylor 2020-05-14 11:16:54 +01:00
parent 9ebcca5b56
commit f420522862
1 changed files with 2 additions and 1 deletions

View File

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