From f4205228622d81ed38ad53e19cdb32357ee25edc Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 14 May 2020 11:16:54 +0100 Subject: [PATCH] Optimise the timestamp handling. --- NXDNGateway/KenwoodNetwork.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NXDNGateway/KenwoodNetwork.cpp b/NXDNGateway/KenwoodNetwork.cpp index 05b9433..2e521c8 100644 --- a/NXDNGateway/KenwoodNetwork.cpp +++ b/NXDNGateway/KenwoodNetwork.cpp @@ -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