diff --git a/P25NID.cpp b/P25NID.cpp index 0c50dbf..20d8f91 100644 --- a/P25NID.cpp +++ b/P25NID.cpp @@ -34,8 +34,8 @@ m_ldu1(NULL), m_ldu2(NULL), m_termlc(NULL), m_term(NULL), -m_pdu(NULL), -m_tsdu(NULL) +m_tsdu(NULL), +m_pdu(NULL) { CBCH bch; diff --git a/StopWatch.cpp b/StopWatch.cpp index 2f15645..eb32961 100644 --- a/StopWatch.cpp +++ b/StopWatch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,7 +74,9 @@ unsigned int CStopWatch::elapsed() { struct timespec now; ::clock_gettime(CLOCK_MONOTONIC, &now); + int offset = ((now.tv_sec - m_start.tv_sec) * 1000000000UL + now.tv_nsec - m_start.tv_nsec ) / 1000000UL; + return (unsigned int)offset; } diff --git a/StopWatch.h b/StopWatch.h index a1e2bf8..554f91c 100644 --- a/StopWatch.h +++ b/StopWatch.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2018 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by