mirror of
https://github.com/ShaYmez/NXDNClients.git
synced 2024-11-19 06:11:45 -05:00
Optimise the timestamp handling.
This commit is contained in:
parent
9ebcca5b56
commit
f420522862
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user