Fix tabs introduced in latest commits...

This commit is contained in:
vsonnier 2017-05-21 09:58:45 +02:00
parent e0af609224
commit 41c7dd231b
4 changed files with 180 additions and 181 deletions

View File

@ -183,9 +183,9 @@ void SDRThread::deinit() {
void SDRThread::assureBufferMinSize(SDRThreadIQData * dataOut, size_t minSize) { void SDRThread::assureBufferMinSize(SDRThreadIQData * dataOut, size_t minSize) {
if (dataOut->data.size() < minSize) { if (dataOut->data.size() < minSize) {
dataOut->data.resize(minSize); dataOut->data.resize(minSize);
} }
} }
//Called in an infinite loop, read SaopySDR device to build //Called in an infinite loop, read SaopySDR device to build
@ -199,42 +199,42 @@ void SDRThread::readStream(SDRThreadIQDataQueue* iqDataOutQueue) {
int nElems = numElems.load(); int nElems = numElems.load();
int mtElems = mtuElems.load(); int mtElems = mtuElems.load();
// Warning: if MTU > numElems, i.e if device MTU is too big w.r.t the sample rate, the TARGET_DISPLAY_FPS cannot // Warning: if MTU > numElems, i.e if device MTU is too big w.r.t the sample rate, the TARGET_DISPLAY_FPS cannot
//be reached and the CubicSDR displays "slows down". //be reached and the CubicSDR displays "slows down".
//To get back a TARGET_DISPLAY_FPS, the user need to adapt //To get back a TARGET_DISPLAY_FPS, the user need to adapt
//the SoapySDR Device to use smaller buffer sizes, because //the SoapySDR Device to use smaller buffer sizes, because
// readStream() is suited to device MTU and cannot be really adapted dynamically. // readStream() is suited to device MTU and cannot be really adapted dynamically.
//TODO: Add in doc the need to reduce SoapySDR device buffer length (if available) to restore higher fps. //TODO: Add in doc the need to reduce SoapySDR device buffer length (if available) to restore higher fps.
//0. Retreive a new batch //0. Retreive a new batch
SDRThreadIQData *dataOut = buffers.getBuffer(); SDRThreadIQData *dataOut = buffers.getBuffer();
//1.If overflow occured on the previous readStream(), transfer it in dataOut directly. //1.If overflow occured on the previous readStream(), transfer it in dataOut directly.
//Take care of the iq_swap option. //Take care of the iq_swap option.
if (numOverflow > 0) { if (numOverflow > 0) {
int n_overflow = std::min(numOverflow, nElems); int n_overflow = std::min(numOverflow, nElems);
assureBufferMinSize(dataOut, n_overflow); assureBufferMinSize(dataOut, n_overflow);
::memcpy(&dataOut->data[0], &overflowBuffer.data[0], n_overflow * sizeof(liquid_float_complex)); ::memcpy(&dataOut->data[0], &overflowBuffer.data[0], n_overflow * sizeof(liquid_float_complex));
n_read = n_overflow; n_read = n_overflow;
numOverflow = std::min(0, numOverflow - n_overflow); numOverflow = std::min(0, numOverflow - n_overflow);
// std::cout << "SDRThread::readStream() 1.1 overflowBuffer not empty, collect the remaining " << n_overflow << " samples in it..." << std::endl; // std::cout << "SDRThread::readStream() 1.1 overflowBuffer not empty, collect the remaining " << n_overflow << " samples in it..." << std::endl;
if (numOverflow > 0) { // still some left, shift the remaining samples to the begining.. if (numOverflow > 0) { // still some left, shift the remaining samples to the begining..
::memmove(&overflowBuffer.data[0], &overflowBuffer.data[n_overflow], numOverflow * sizeof(liquid_float_complex)); ::memmove(&overflowBuffer.data[0], &overflowBuffer.data[n_overflow], numOverflow * sizeof(liquid_float_complex));
std::cout << "SDRThread::readStream() 1.2 overflowBuffer still not empty, compact the remaining " << numOverflow << " samples in it..." << std::endl; std::cout << "SDRThread::readStream() 1.2 overflowBuffer still not empty, compact the remaining " << numOverflow << " samples in it..." << std::endl;
} }
} //end if numOverflow > 0 } //end if numOverflow > 0
//2. attempt readStream() at most nElems, by mtElems-sized chunks, append in dataOut->data directly. //2. attempt readStream() at most nElems, by mtElems-sized chunks, append in dataOut->data directly.
while (n_read < nElems && !stopping) { while (n_read < nElems && !stopping) {
//Whatever the number of remaining samples needed to reach nElems, we always try to read a mtElems-size chunk, //Whatever the number of remaining samples needed to reach nElems, we always try to read a mtElems-size chunk,
//from which SoapySDR effectively returns n_stream_read. //from which SoapySDR effectively returns n_stream_read.
int n_stream_read = device->readStream(stream, buffs, mtElems, flags, timeNs); int n_stream_read = device->readStream(stream, buffs, mtElems, flags, timeNs);
//if the n_stream_read <= 0, bail out from reading. //if the n_stream_read <= 0, bail out from reading.
@ -261,67 +261,67 @@ void SDRThread::readStream(SDRThreadIQDataQueue* iqDataOutQueue) {
//nor that the Re/Im layout of fields matches the float array order, assign liquid_float_complex field by field. //nor that the Re/Im layout of fields matches the float array order, assign liquid_float_complex field by field.
float *pp = (float *)buffs[0]; float *pp = (float *)buffs[0];
assureBufferMinSize(dataOut, n_read + n_requested); assureBufferMinSize(dataOut, n_read + n_requested);
if (iq_swap.load()) { if (iq_swap.load()) {
for (int i = 0; i < n_requested; i++) { for (int i = 0; i < n_requested; i++) {
dataOut->data[n_read + i].imag = pp[2 * i]; dataOut->data[n_read + i].imag = pp[2 * i];
dataOut->data[n_read + i].real = pp[2 * i + 1]; dataOut->data[n_read + i].real = pp[2 * i + 1];
} }
} else { } else {
for (int i = 0; i < n_requested; i++) { for (int i = 0; i < n_requested; i++) {
dataOut->data[n_read + i].real = pp[2 * i]; dataOut->data[n_read + i].real = pp[2 * i];
dataOut->data[n_read + i].imag = pp[2 * i + 1]; dataOut->data[n_read + i].imag = pp[2 * i + 1];
} }
} }
//shift of n_requested samples, each one made of 2 floats... //shift of n_requested samples, each one made of 2 floats...
pp += n_requested * 2; pp += n_requested * 2;
//numNewOverflow are in exess, they have to be added in the existing overflowBuffer. //numNewOverflow are in exess, they have to be added in the existing overflowBuffer.
int numNewOverflow = n_stream_read - n_requested; int numNewOverflow = n_stream_read - n_requested;
//so push the remainder samples to overflowBuffer: //so push the remainder samples to overflowBuffer:
if (numNewOverflow > 0) { if (numNewOverflow > 0) {
// std::cout << "SDRThread::readStream(): 2. SoapySDR read make nElems overflow by " << numNewOverflow << " samples..." << std::endl; // std::cout << "SDRThread::readStream(): 2. SoapySDR read make nElems overflow by " << numNewOverflow << " samples..." << std::endl;
} }
assureBufferMinSize(&overflowBuffer, numOverflow + numNewOverflow); assureBufferMinSize(&overflowBuffer, numOverflow + numNewOverflow);
if (iq_swap.load()) { if (iq_swap.load()) {
for (int i = 0; i < numNewOverflow; i++) { for (int i = 0; i < numNewOverflow; i++) {
overflowBuffer.data[numOverflow + i].imag = pp[2 * i]; overflowBuffer.data[numOverflow + i].imag = pp[2 * i];
overflowBuffer.data[numOverflow + i].real = pp[2 * i + 1]; overflowBuffer.data[numOverflow + i].real = pp[2 * i + 1];
} }
} }
else { else {
for (int i = 0; i < numNewOverflow; i++) { for (int i = 0; i < numNewOverflow; i++) {
overflowBuffer.data[numOverflow + i].real = pp[2 * i]; overflowBuffer.data[numOverflow + i].real = pp[2 * i];
overflowBuffer.data[numOverflow + i].imag = pp[2 * i + 1]; overflowBuffer.data[numOverflow + i].imag = pp[2 * i + 1];
} }
} }
numOverflow += numNewOverflow; numOverflow += numNewOverflow;
n_read += n_requested; n_read += n_requested;
} else if (n_stream_read > 0) { // no overflow, read the whole n_stream_read. } else if (n_stream_read > 0) { // no overflow, read the whole n_stream_read.
float *pp = (float *)buffs[0]; float *pp = (float *)buffs[0];
assureBufferMinSize(dataOut, n_read + n_stream_read); assureBufferMinSize(dataOut, n_read + n_stream_read);
if (iq_swap.load()) { if (iq_swap.load()) {
for (int i = 0; i < n_stream_read; i++) { for (int i = 0; i < n_stream_read; i++) {
dataOut->data[n_read + i].imag = pp[2 * i]; dataOut->data[n_read + i].imag = pp[2 * i];
dataOut->data[n_read + i].real = pp[2 * i + 1]; dataOut->data[n_read + i].real = pp[2 * i + 1];
} }
} }
else { else {
for (int i = 0; i < n_stream_read; i++) { for (int i = 0; i < n_stream_read; i++) {
dataOut->data[n_read + i].real = pp[2 * i]; dataOut->data[n_read + i].real = pp[2 * i];
dataOut->data[n_read + i].imag = pp[2 * i + 1]; dataOut->data[n_read + i].imag = pp[2 * i + 1];
} }
} }
n_read += n_stream_read; n_read += n_stream_read;
} else { } else {
@ -329,11 +329,11 @@ void SDRThread::readStream(SDRThreadIQDataQueue* iqDataOutQueue) {
} }
} //end while } //end while
//3. At that point, dataOut contains nElems (or less if a read has return an error), try to post in queue, else discard. //3. At that point, dataOut contains nElems (or less if a read has return an error), try to post in queue, else discard.
if (n_read > 0 && !stopping && !iqDataOutQueue->full()) { if (n_read > 0 && !stopping && !iqDataOutQueue->full()) {
//clamp result: //clamp result:
dataOut->data.resize(n_read); dataOut->data.resize(n_read);
dataOut->frequency = frequency.load(); dataOut->frequency = frequency.load();
dataOut->sampleRate = sampleRate.load(); dataOut->sampleRate = sampleRate.load();
@ -350,11 +350,11 @@ void SDRThread::readStream(SDRThreadIQDataQueue* iqDataOutQueue) {
//saturation, let a chance to the other threads to consume the existing samples //saturation, let a chance to the other threads to consume the existing samples
std::this_thread::yield(); std::this_thread::yield();
} }
} }
else { else {
dataOut->setRefCount(0); dataOut->setRefCount(0);
std::cout << "SDRThread::readStream(): 3.1 iqDataOutQueue output queue is full, discard processing of the batch..." << std::endl; std::cout << "SDRThread::readStream(): 3.1 iqDataOutQueue output queue is full, discard processing of the batch..." << std::endl;
} }
} }
void SDRThread::readLoop() { void SDRThread::readLoop() {
@ -425,7 +425,7 @@ void SDRThread::updateSettings() {
free(buffs[0]); free(buffs[0]);
buffs[0] = malloc(mtuElems.load() * 4 * sizeof(float)); buffs[0] = malloc(mtuElems.load() * 4 * sizeof(float));
//clear overflow buffer //clear overflow buffer
numOverflow = 0; numOverflow = 0;
rate_changed.store(false); rate_changed.store(false);
doUpdate = true; doUpdate = true;
@ -675,9 +675,9 @@ void SDRThread::setGain(std::string name, float value) {
float SDRThread::getGain(std::string name) { float SDRThread::getGain(std::string name) {
std::lock_guard < std::mutex > lock(gain_busy); std::lock_guard < std::mutex > lock(gain_busy);
float val = gainValues[name]; float val = gainValues[name];
return val; return val;
} }
void SDRThread::writeSetting(std::string name, std::string value) { void SDRThread::writeSetting(std::string name, std::string value) {

View File

@ -37,15 +37,15 @@ public:
/*! Create safe blocking queue. */ /*! Create safe blocking queue. */
ThreadBlockingQueue() { ThreadBlockingQueue() {
//at least 1 (== Exchanger) //at least 1 (== Exchanger)
m_circular_buffer.resize(MIN_ITEM_NB + 1); //there is one slot more than the size for internal management. m_circular_buffer.resize(MIN_ITEM_NB + 1); //there is one slot more than the size for internal management.
}; };
//Copy constructor //Copy constructor
ThreadBlockingQueue(const ThreadBlockingQueue& sq) { ThreadBlockingQueue(const ThreadBlockingQueue& sq) {
std::lock_guard < std::mutex > lock(sq.m_mutex); std::lock_guard < std::mutex > lock(sq.m_mutex);
m_circular_buffer = sq.m_circular_buffer; m_circular_buffer = sq.m_circular_buffer;
m_head = sq.m_head; m_head = sq.m_head;
m_tail = sq.m_tail; m_tail = sq.m_tail;
} }
/*! Destroy safe queue. */ /*! Destroy safe queue. */
@ -64,7 +64,7 @@ public:
if (max_num_items > (unsigned int)privateMaxNumElements()) { if (max_num_items > (unsigned int)privateMaxNumElements()) {
//Only raise the existing max size, never reduce it //Only raise the existing max size, never reduce it
//for simplification sake at runtime. //for simplification sake at runtime.
m_circular_buffer.resize(max_num_items + 1); // there is 1 extra allocated slot. m_circular_buffer.resize(max_num_items + 1); // there is 1 extra allocated slot.
//m_head and m_tail stays valid. //m_head and m_tail stays valid.
m_cond_not_full.notify_all(); m_cond_not_full.notify_all();
} }
@ -100,11 +100,11 @@ public:
return false; return false;
} }
//m_tail is already the next valid place an item can be put //m_tail is already the next valid place an item can be put
m_circular_buffer[m_tail] = item; m_circular_buffer[m_tail] = item;
m_tail = nextIndex(m_tail, (int)m_circular_buffer.size()); m_tail = nextIndex(m_tail, (int)m_circular_buffer.size());
m_cond_not_empty.notify_all(); m_cond_not_empty.notify_all();
return true; return true;
} }
@ -120,9 +120,9 @@ public:
return false; return false;
} }
//m_tail is already the next valid place an item can be put //m_tail is already the next valid place an item can be put
m_circular_buffer[m_tail] = item; m_circular_buffer[m_tail] = item;
m_tail = nextIndex(m_tail, (int)m_circular_buffer.size()); m_tail = nextIndex(m_tail, (int)m_circular_buffer.size());
m_cond_not_empty.notify_all(); m_cond_not_empty.notify_all();
return true; return true;
@ -156,7 +156,7 @@ public:
} }
item = m_circular_buffer[m_head]; item = m_circular_buffer[m_head];
m_head = nextIndex(m_head, (int)m_circular_buffer.size()); m_head = nextIndex(m_head, (int)m_circular_buffer.size());
m_cond_not_full.notify_all(); m_cond_not_full.notify_all();
return true; return true;
@ -174,8 +174,8 @@ public:
return false; return false;
} }
item = m_circular_buffer[m_head]; item = m_circular_buffer[m_head];
m_head = nextIndex(m_head, (int)m_circular_buffer.size()); m_head = nextIndex(m_head, (int)m_circular_buffer.size());
m_cond_not_full.notify_all(); m_cond_not_full.notify_all();
return true; return true;
@ -214,8 +214,8 @@ public:
*/ */
void flush() { void flush() {
std::lock_guard < std::mutex > lock(m_mutex); std::lock_guard < std::mutex > lock(m_mutex);
m_head = 0; m_head = 0;
m_tail = 0; m_tail = 0;
m_cond_not_full.notify_all(); m_cond_not_full.notify_all();
} }
@ -231,7 +231,7 @@ public:
m_circular_buffer.swap(sq.m_circular_buffer); m_circular_buffer.swap(sq.m_circular_buffer);
std::swap(m_head, sq.m_head); std::swap(m_head, sq.m_head);
std::swap(m_tail, sq.m_tail); std::swap(m_tail, sq.m_tail);
if (privateSize() > 0) { if (privateSize() > 0) {
m_cond_not_empty.notify_all(); m_cond_not_empty.notify_all();
@ -257,10 +257,10 @@ public:
std::lock_guard < std::mutex > lock1(m_mutex); std::lock_guard < std::mutex > lock1(m_mutex);
std::lock_guard < std::mutex > lock2(sq.m_mutex); std::lock_guard < std::mutex > lock2(sq.m_mutex);
m_circular_buffer = sq.m_circular_buffer; m_circular_buffer = sq.m_circular_buffer;
m_head = sq.m_head; m_head = sq.m_head;
m_tail = sq.m_tail; m_tail = sq.m_tail;
if (privateSize() > 0) { if (privateSize() > 0) {
m_cond_not_empty.notify_all(); m_cond_not_empty.notify_all();
@ -277,31 +277,31 @@ private:
/// use a circular buffer structure to prevent allocations / reallocations (fixed array + modulo) /// use a circular buffer structure to prevent allocations / reallocations (fixed array + modulo)
std::vector<T> m_circular_buffer; std::vector<T> m_circular_buffer;
/** /**
* The 'head' index of the element at the head of the deque, 'tail' * The 'head' index of the element at the head of the deque, 'tail'
* the next (valid !) index at which an element can be pushed. * the next (valid !) index at which an element can be pushed.
* m_head == m_tail means empty. * m_head == m_tail means empty.
*/ */
int m_head = 0, m_tail = 0; int m_head = 0, m_tail = 0;
// //
inline int nextIndex(int index, int modulus) const { inline int nextIndex(int index, int modulus) const {
return (index + 1 == modulus) ? 0 : index + 1; return (index + 1 == modulus) ? 0 : index + 1;
} }
// //
inline int privateSize() const { inline int privateSize() const {
if (m_head <= m_tail) { if (m_head <= m_tail) {
return m_tail - m_head; return m_tail - m_head;
} }
return (m_tail - m_head + (int)m_circular_buffer.size()); return (m_tail - m_head + (int)m_circular_buffer.size());
} }
// //
inline int privateMaxNumElements() const { inline int privateMaxNumElements() const {
return (int)m_circular_buffer.size() - 1; return (int)m_circular_buffer.size() - 1;
} }
mutable std::mutex m_mutex; mutable std::mutex m_mutex;
std::condition_variable m_cond_not_empty; std::condition_variable m_cond_not_empty;

View File

@ -4,7 +4,7 @@
#include "Timer.h" #include "Timer.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif
#include <iostream> #include <iostream>
@ -12,167 +12,167 @@
Timer::Timer(void) : time_elapsed(0), system_milliseconds(0), start_time(0), end_time(0), last_update(0), num_updates(0), paused_time(0), offset(0), paused_state(false), lock_state(false), lock_rate(0) Timer::Timer(void) : time_elapsed(0), system_milliseconds(0), start_time(0), end_time(0), last_update(0), num_updates(0), paused_time(0), offset(0), paused_state(false), lock_state(false), lock_rate(0)
{ {
#ifdef _WIN32 #ifdef _WIN32
// According to Microsoft, QueryPerformanceXXX API is perfectly // According to Microsoft, QueryPerformanceXXX API is perfectly
//fine for Windows 7+ systems, and use the highest appropriate counter. //fine for Windows 7+ systems, and use the highest appropriate counter.
//this only need to be done once. //this only need to be done once.
::QueryPerformanceFrequency(&win_frequency); ::QueryPerformanceFrequency(&win_frequency);
#endif; #endif;
} }
void Timer::start(void) void Timer::start(void)
{ {
update(); update();
num_updates = 0; num_updates = 0;
start_time = system_milliseconds; start_time = system_milliseconds;
last_update = start_time; last_update = start_time;
paused_state = false; paused_state = false;
lock_state = false; lock_state = false;
lock_rate = 0; lock_rate = 0;
paused_time = 0; paused_time = 0;
offset = 0; offset = 0;
} }
void Timer::stop(void) void Timer::stop(void)
{ {
end_time = system_milliseconds; end_time = system_milliseconds;
} }
void Timer::reset(void) void Timer::reset(void)
{ {
start(); start();
} }
void Timer::lockFramerate(float f_rate) void Timer::lockFramerate(float f_rate)
{ {
lock_rate = 1.0f/f_rate; lock_rate = 1.0f/f_rate;
lock_state = true; lock_state = true;
} }
void Timer::unlock() void Timer::unlock()
{ {
unsigned long msec_tmp = system_milliseconds; unsigned long msec_tmp = system_milliseconds;
lock_state = false; lock_state = false;
update(); update();
last_update = system_milliseconds-(unsigned long)lock_rate; last_update = system_milliseconds-(unsigned long)lock_rate;
offset += msec_tmp-system_milliseconds; offset += msec_tmp-system_milliseconds;
lock_rate = 0; lock_rate = 0;
} }
bool Timer::locked() bool Timer::locked()
{ {
return lock_state; return lock_state;
} }
void Timer::update(void) void Timer::update(void)
{ {
num_updates++; num_updates++;
last_update = system_milliseconds; last_update = system_milliseconds;
if (lock_state) if (lock_state)
{ {
system_milliseconds += (unsigned long)(lock_rate*1000.0); system_milliseconds += (unsigned long)(lock_rate*1000.0);
} }
else else
{ {
#ifdef _WIN32 #ifdef _WIN32
//Use QuaryPerformanceCounter, imune to problems sometimes //Use QuaryPerformanceCounter, imune to problems sometimes
//multimedia timers have. //multimedia timers have.
LARGE_INTEGER win_current_count; LARGE_INTEGER win_current_count;
::QueryPerformanceCounter(&win_current_count); ::QueryPerformanceCounter(&win_current_count);
system_milliseconds = (unsigned long)(win_current_count.QuadPart * 1000.0 / win_frequency.QuadPart); system_milliseconds = (unsigned long)(win_current_count.QuadPart * 1000.0 / win_frequency.QuadPart);
#else #else
gettimeofday(&time_val,&time_zone); gettimeofday(&time_val,&time_zone);
system_milliseconds = (unsigned long)time_val.tv_usec; system_milliseconds = (unsigned long)time_val.tv_usec;
system_milliseconds /= 1000; system_milliseconds /= 1000;
system_milliseconds += (unsigned long)(time_val.tv_sec*1000); system_milliseconds += (unsigned long)(time_val.tv_sec*1000);
#endif #endif
} }
if (paused_state) paused_time += system_milliseconds-last_update; if (paused_state) paused_time += system_milliseconds-last_update;
time_elapsed = system_milliseconds-start_time-paused_time+offset; time_elapsed = system_milliseconds-start_time-paused_time+offset;
} }
unsigned long Timer::getMilliseconds(void) unsigned long Timer::getMilliseconds(void)
{ {
return time_elapsed; return time_elapsed;
} }
double Timer::getSeconds(void) double Timer::getSeconds(void)
{ {
return ((double)getMilliseconds())/1000.0; return ((double)getMilliseconds())/1000.0;
} }
void Timer::setMilliseconds(unsigned long milliseconds_in) void Timer::setMilliseconds(unsigned long milliseconds_in)
{ {
offset -= (system_milliseconds-start_time-paused_time+offset)-milliseconds_in; offset -= (system_milliseconds-start_time-paused_time+offset)-milliseconds_in;
} }
void Timer::setSeconds(double seconds_in) void Timer::setSeconds(double seconds_in)
{ {
setMilliseconds((long)(seconds_in*1000.0)); setMilliseconds((long)(seconds_in*1000.0));
} }
double Timer::lastUpdateSeconds(void) double Timer::lastUpdateSeconds(void)
{ {
return ((double)lastUpdateMilliseconds())/1000.0; return ((double)lastUpdateMilliseconds())/1000.0;
} }
unsigned long Timer::lastUpdateMilliseconds(void) unsigned long Timer::lastUpdateMilliseconds(void)
{ {
return system_milliseconds-last_update; return system_milliseconds-last_update;
} }
unsigned long Timer::totalMilliseconds() unsigned long Timer::totalMilliseconds()
{ {
return system_milliseconds-start_time; return system_milliseconds-start_time;
} }
double Timer::totalSeconds(void) double Timer::totalSeconds(void)
{ {
return totalMilliseconds()/1000.0; return totalMilliseconds()/1000.0;
} }
unsigned long Timer::getNumUpdates(void) unsigned long Timer::getNumUpdates(void)
{ {
return num_updates; return num_updates;
} }
void Timer::paused(bool pause_in) void Timer::paused(bool pause_in)
{ {
paused_state = pause_in; paused_state = pause_in;
} }
bool Timer::paused() bool Timer::paused()
{ {
return paused_state; return paused_state;
} }
void Timer::timerTestFunc() { void Timer::timerTestFunc() {

View File

@ -18,7 +18,6 @@
class Timer { class Timer {
private: private:
//units are microsecs:
unsigned long time_elapsed; unsigned long time_elapsed;
unsigned long system_milliseconds; unsigned long system_milliseconds;
unsigned long start_time; unsigned long start_time;
@ -32,7 +31,7 @@ private:
struct timeval time_val; struct timeval time_val;
struct timezone time_zone; struct timezone time_zone;
#else #else
LARGE_INTEGER win_frequency; LARGE_INTEGER win_frequency;
#endif; #endif;
bool paused_state; bool paused_state;