mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Clean up the merged code.
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 500U;
|
const unsigned int BUFFER_LENGTH = 500U;
|
||||||
|
|
||||||
@@ -123,10 +123,10 @@ void CDMRNetwork::setConfig(const std::string& callsign, unsigned int rxFrequenc
|
|||||||
bool CDMRNetwork::open()
|
bool CDMRNetwork::open()
|
||||||
{
|
{
|
||||||
LogMessage("DMR, Opening DMR Network");
|
LogMessage("DMR, Opening DMR Network");
|
||||||
|
|
||||||
if (m_address.s_addr == INADDR_NONE)
|
if (m_address.s_addr == INADDR_NONE)
|
||||||
{
|
|
||||||
m_address = CUDPSocket::lookup(m_addressStr);
|
m_address = CUDPSocket::lookup(m_addressStr);
|
||||||
}
|
|
||||||
m_status = WAITING_CONNECT;
|
m_status = WAITING_CONNECT;
|
||||||
m_timeoutTimer.stop();
|
m_timeoutTimer.stop();
|
||||||
m_retryTimer.start();
|
m_retryTimer.start();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
|
|
||||||
const unsigned int BUFFER_LENGTH = 100U;
|
const unsigned int BUFFER_LENGTH = 100U;
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,8 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdlib.h>
|
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(_WIN64)
|
#if !defined(_WIN32) && !defined(_WIN64)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "StopWatch.h"
|
#include "StopWatch.h"
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
@@ -53,6 +52,7 @@ unsigned int CStopWatch::elapsed()
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
CStopWatch::CStopWatch() :
|
CStopWatch::CStopWatch() :
|
||||||
m_start()
|
m_start()
|
||||||
@@ -66,7 +66,8 @@ CStopWatch::~CStopWatch()
|
|||||||
unsigned long CStopWatch::start()
|
unsigned long CStopWatch::start()
|
||||||
{
|
{
|
||||||
::clock_gettime(CLOCK_MONOTONIC, &m_start);
|
::clock_gettime(CLOCK_MONOTONIC, &m_start);
|
||||||
return (m_start.tv_sec * 1000UL) + (m_start.tv_nsec / 1000000UL);
|
|
||||||
|
return m_start.tv_sec * 1000UL + m_start.tv_nsec / 1000000UL;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CStopWatch::elapsed()
|
unsigned int CStopWatch::elapsed()
|
||||||
|
|||||||
Reference in New Issue
Block a user