mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-07 08:24:47 -04:00
Prototype waterfall rate smoothing / fps matching
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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(0), lock_rate(0)
|
||||
{
|
||||
}
|
||||
@@ -157,3 +159,14 @@ bool Timer::paused()
|
||||
{
|
||||
return paused_state;
|
||||
}
|
||||
|
||||
void Timer::timerTestFunc() {
|
||||
update();
|
||||
if (getNumUpdates() % 120 == 0) {
|
||||
std::cout << getNumUpdates() << "," << getSeconds() << " Rate: " << ((double)getNumUpdates()/getSeconds()) << "/sec" << std::endl;
|
||||
}
|
||||
if (getNumUpdates() >= 600) {
|
||||
reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,9 @@ public:
|
||||
* \return Current pause state, true if paused, false otherwise
|
||||
*/
|
||||
bool paused();
|
||||
|
||||
|
||||
void timerTestFunc();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user